Easygoing Eyebeast Thralni Posted December 20, 2005 Share Posted December 20, 2005 the time has come for me to go one small step further, and that is to start using variables. Now i don't really understand what a variable can be. Jeff used mostly letters like "x," "i," and "j," but there's also a variable "choice." Now here's the question. can a variable be also words, like a variable "day." Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted December 20, 2005 Share Posted December 20, 2005 Yes. You can almost any word you like as a variable, except for the ones you can't. I know that the word "shop" can't be used as a variable because it's used internally by the game engine; there are a few others as well. "Day" may well be one of them; be sure to test it. If you try to use a reserved variable name, you'll get an error message. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted December 20, 2005 Author Share Posted December 20, 2005 Okay, thanks Thuryl. I'll test it out. if "day" doesn't work, will "day2" or other variations work? Link to comment Share on other sites More sharing options...
Well-Actually War Trall Niemand Posted December 20, 2005 Share Posted December 20, 2005 They should, but you might want avoid putting numbers at the beginning of variable names, because many systems, possibly including avernumscript, are confused by this. I have never seen a reserved variable use error, I just discovered that my script was behaving oddly, so be careful and test thoroughly. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted December 20, 2005 Share Posted December 20, 2005 Numbers at the end of variable names are fine, though, as in "day2" — I know because Jeff uses "r1" and "r2" at least a couple of times in his scenarios. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted December 20, 2005 Author Share Posted December 20, 2005 Thanks to all of you. I tested it a couple of times, and it all seems to work fine. i hope I can release my scenario for betatesting in one or two months, if I continue working on it like now. every evening a bit. Link to comment Share on other sites More sharing options...
Kyshakk Koan KernelKnowledge12 Posted December 20, 2005 Share Posted December 20, 2005 Quote: Originally written by Niemand: I have never seen a reserved variable use error, I just discovered that my script was behaving oddly, so be careful and test thoroughly. If this is a serious problem, you should use a generic prefix for some variables. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted December 23, 2005 Author Share Posted December 23, 2005 Hmmmm, it seems as though i'm doing something wrong. can anybody (Thuryl, Kelandon perhaps?) look at the script(s) please? I don't wan to post them here, as though i'm afraid somebody would steal my idea which i'm so proud of. I'll email the one who wants to help the two scripts that are the problem and explain what the problem is. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted December 23, 2005 Share Posted December 23, 2005 No one is going to steal your idea. I'll look at your script. Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Thralni Posted December 23, 2005 Author Share Posted December 23, 2005 I sent you a privat message, i hope you don't mind if it were an email or privat message. Link to comment Share on other sites More sharing options...
Recommended Posts