PDA

View Full Version : Maximum number of variables in ONScripter


Message
2006-10-01, 07:43
From the NScripter Reference (http://nscripter.insani.org/reference/meirei/syosiki04.htm): "Numerical variables can range from %0~%999 -- 1000 total." But then I see that Tsukihime uses %4000 and higher, and as far as I can tell they aren't aliases. How is this possible? Can I safely start using a new %3999 without jumping through burning hoops?

ChocoEd
2006-10-01, 07:56
From the NScripter Reference (http://nscripter.insani.org/reference/meirei/syosiki04.htm): "Numerical variables can range from %0?%999 -- 1000 total." But then I see that Tsukihime uses %4000 and higher, and as far as I can tell they aren't aliases. How is this possible? Can I safely start using a new %3999 without jumping through burning hoops?
The insani docs are translated from the original NScripter reference, but it looks like ONScripter has an extended limit of 4096 variables instead (the VARIABLE_RANGE constant), so you should be fine to use new ones. At a guess, Mirror Moon purposefully chose new variables in the high range to avoid conflicting with any ones used by the original script.

Message
2006-10-01, 08:23
In that case Tsukihime must be using ONScripter as well, as these are all original TYPE MOON codelines. >_> Strange, I would've thought it was NScripter.

ChocoEd
2006-10-01, 09:19
In that case Tsukihime must be using ONScripter as well, as these are all original TYPE MOON codelines. >_> Strange, I would've thought it was NScripter.
Just consulted with gp32, and he clarified the situation. The 0-999 is the official, supported, documented range, but the original NScripter engine actually implemented support for an extended range (the intention being to use them for internal system functions that never got around to being written). Apparently it's one of many undocumented features of NScripter which are known to one degree or another in the community, and the ONScripter range was chosen to be compatible with use "in the field".

Message
2006-10-01, 23:43
Hah, that makes a lot more sense. Thanks a bunch, you both.