I get a compiler error (invalid parameter) if I use 0 as the parameter for
run-script. I have a test in my global script (in dialog_request) for values
0 through 4. If I simply change
run-script 0 to run-script 4 the compiler is happy. Is zero not allowed?
If it doesn't work then it's quite obviously not allowed. "error (invalid parameter)" pretty much says it all.
As Pablo said, the error message pretty much says it all. The example in the BFAQ starts from 1, not 0, so it's probably a known issue even if it's not explicitly stated anywhere. Other than curiousity, is there an actual problem here?
It'd be good if it was mentioned somewhere, but losing one possible value for run-script shouldn't mess up anyone's game. You can always use GlobalInts and set-globalint for 'extra' parameters:
// dialogue
set-globalint 1 3
run-script 1
//global script
function dialog_request (int xvalue) {
if (xvalue == 1) {
if (GetGlobalInt(1) == 1) {
// whatever
}
// etc
}
}