Wow. Ridiculously better.
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
sv: Expression 2 (GunShop Console Screen Controller (Networked)): entities/gmod_wire_expression2/core/globalvars.lua:58: attempt to index global 'gravs' (a nil value)
Breaks when i do this:
post merge:Code:Group = gTable("GunShop") CostArray[1,number] = 150 CostArray[2,number] = 250 CostArray[3,number] = 300 CostArray[4,number] = 400 CostArray[5,number] = 450 Group["Cost",array] = CostArray
scratch that.
If you have gTable("WHOOPDYDOOHERESMYTABLE") your e2 will crash because you have no following number... gTable("Table",0)
quick little line edit?
Last edited by Divran; 06-16-2010 at 11:27 AM. Reason: Post merge
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
Am I the only one not very fond of the Blah["Index", type] syntax? It just "Feels" wrong to me. In most cases the parser should be able to guess the type of variable you are setting/getting, shouldn't it? But then the problem is with how to return that type, since there is no type conversion (From what I recall). I might look into how this can be solved sometime. ~Adds to her massive TODO List~
EDIT:
Am I right in the guess that this is the type of thing initrd.gz is trying to solve with the "generic" type he is making? (Though it's not quite there, you still have to pull the type info out yourself)
Last edited by Selig; 06-16-2010 at 05:04 PM.
Last edited by Divran; 06-17-2010 at 08:27 AM.
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
It's impossible to solve the way the language currently works, and it's done that way to be fast and simple. Setting the an index doesn't NEED the type, but it's there so that people don't mess up and it keeps the syntax consistent. Issue is not even that there is no type conversion, there can be no implicit type conversion when assigning to variables unless one changes the entire scope-model in E2 and a bunch of other stuff. E2 is statically typed and deduces variable types from assignment, hence, assignment to variables must always have a predefined type... which can only be known if you specify it or return a generic type that is implicitly cast when used (but that opens up a lot of ambiguity and unnecessarily complicates the language).
Long story short, E2 is statically typed, there is nothing one can do about it without adversely affecting the language.
Bookmarks