|
Post by Power Supersport on Jun 29, 2015 12:36:17 GMT
Please, help, guys... I really stuck here...
Take a look at the script...
// Block 1 if (ObjectID[ImposterID] == 1) { iObjectImposterSet(OBJ_66,ImpObject[0],ObjectOrientation[ImposterID],ObjectLocation[ImposterID]); iObjectImposterSet(OBJ_88,ImpObject[0],ObjectOrientation[ImposterID],ObjectLocation[ImposterID]); iObjectImposterSet(OBJ_176,ImpObject[0],ObjectOrientation[ImposterID],ObjectLocation[ImposterID]); ---------------> Imposter[ImpObject[0]] = ImposterID; <----------------- ImpObject[0] += 1; if (ImpObject[0] >= Imposters) ImpObject[0] = 0; } It doesn't supposed to happen... I get "Error Line 255: Out of range" Actually my line 255 is Imposter[ImpObject[0]] = ImposterID;
The error mustn't hapen logically because my array allows 100 000 values... Imposters = 100...
So the value ImpObject[0] supposed to be between 0 and 100... Array allows up to 100 000... what's the problem?
/I don't want to share all the script because it's 650 lines.../
The arrows in the code don't exist in the real script...
|
|
|
Post by Power Supersport on Jun 30, 2015 19:04:45 GMT
Guys... I found the error... It's happening because the script automatically sets a random value when initializing (I don't know why)... I checked this with a ValuePrint and I just saw the huge value... It was kinda 31 532 634... Definitely this is larger than 100 000... and that's causes the crash of my script at the beginning...
|
|
|
Post by Thunder on Jul 1, 2015 13:17:10 GMT
Congrats. You all are so good at scripting. I love being in a forum who can help me.
|
|