nordin dk 0 Posted January 16, 2002 The message Iget (on startup) is 'count |#|= 0': Error Reserved variable in expression I take it the error is found somewhere in my timer or score sripts, but I'm not sure where to look. What could be causing this? Share this post Link to post Share on other sites
4ntifa 0 Posted January 17, 2002 Are you trying to use "count" as a variable name? That would cause an error, because "count" is a reserved word. Other causes for errors could be: using "=" instead of "==" as a comparison operator, omitting a variable name in a statement that should be "varName command". Share this post Link to post Share on other sites
nordin dk 0 Posted January 18, 2002 Here's my score.sqs _count = 0 _max = 0 _TmpArray = PlayersList _list = "" #Start ?(count _TmpArray == 0): Goto "End" ?(Score (_TmpArray select _count) >= _max): _cursor = _count ?(Score (_TmpArray select _count) >= _max): _max = Score (_TmpArray select _count) _count = _count + 1 ?(_count < (count _TmpArray)-1): Goto "Start" _score = Score (_TmpArray select _cursor) _name = Name (_TmpArray select _cursor) _list = _list + format["%1 %2\n", _score, _name] _TmpArray = _TmpArray - [_TmpArray select _cursor] _count = 0 _max = 0 ?(count _TmpArray == 0): Goto "End" Goto "Start" #End _msg = format["Game Over!\nScore:"] titletext [format["%1\n%2", _msg, _list], "PLAIN"] And this is my timer.sqs count = 0 #Start ~1 _count = _count + 1 ?(_count >= Param1): TimeUp = True Goto "Start" These have been taken from the editing center IIRC. I haven't taken the effort to learn the scripting language, so it takes me forever to try and figure out what is wrong. Should I change the _count variable to another name, like "mycount" ?? Share this post Link to post Share on other sites
4ntifa 0 Posted January 18, 2002 It's the first line in timer.sqs: "count = 0". I guess it should read "_count = 0"? Share this post Link to post Share on other sites
Chris Death 0 Posted January 18, 2002 right, and the message tells you that "count" is a reserved variable (even an operation) Share this post Link to post Share on other sites
nordin dk 0 Posted January 18, 2002 Thank you, That took care of the error-message. Now I just need to tweak it a little bit. Share this post Link to post Share on other sites