View Single Post
  #5  
Old 04-14-2003, 11:34 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Well, I guess I am making assumptions about how the scripting engine works. If I'm wrong about it and the change really would be quite simple then cool, no problem. I was under the impression that variable names are discarded at psuedo-compilation and thus that big changes would be needed to make it possible. Even still, though... What about basic error checking? What about conflicts?

Let's say my string list is like so:

string=this.var

In my script is the following:

showimg #s(string),somepicture.png,3,5;

Does it throw an error because the person has tried to use a string where the index should be? If not, we cut out on a large part of the static error detection process. What about this:

say2 #s(string);

In the normal interpretation this would be fine - there'd just be a box saying 'this.var'. If your changes were made then what would happen? say2 would be handed a variable instead of a string, and it wouldn't know what to do with it. Would all the functions of this type need to be altered? I don't know, but it'd be a bad thing if they did.

If strings can suddenly sometimes be variables then static error checking/compilation etc are thrown out of the window. It's much nicer if there's a function that takes a string and returns a variable - only one function needs to be written and nothing else needs to be changed.
__________________
Reply With Quote