SA-MP Forums Archive
Help error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help error (/showthread.php?tid=424607)



Help error - ajam123 - 23.03.2013

I get this error when i compile it...
I'm use Just Roleplay Script

Код:
error 017: undefined symbol "YSI_gSwheelmodels"
error 017: undefined symbol "YSI_gAwheelmodels"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
pawn Код:
iswheelmodel(modelid) {

    new wheelmodels[17] = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1096,1097,1098};

    foreach(wheelmodels, I) {

        if (modelid == wheelmodels[I])
            return true;

    }

    return false;
}
Help please +Rep if you help


Re: Help error - Avi Raj - 23.03.2013

Please can you tell me which line is getting errors?


Re: Help error - ajam123 - 23.03.2013

Код:
 49381 lines - 	foreach(wheelmodels, I) {



Re: Help error - kamzaf - 23.03.2013

pawn Код:
stock iswheelmodel(modelid) {
    new wheelmodels[17] = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1096,1097,1098};
   
    for(new i = 0; i < sizeof(wheelmodels); ++i) {
        if (modelid == wheelmodels[i]) return true;
    }
    return false;
}



Re: Help error - ajam123 - 23.03.2013

Код:
C:\Documents and Settings\Winxp\Desktop\JustRP Publish\rp.pwn(49391) : error 017: undefined symbol "I"
pawn Код:
stock IllegalCarNitroIde(carmodel) {

    new illegalvehs[29] = { 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 537, 538, 570, 449 };
   
    for(new i = 0; i < sizeof(illegalvehs); ++i) {
        if (carmodel == illegalvehs[I]) return true; //this line
    }
    return false;
}



Re: Help error - PaulDinam - 23.03.2013

Capital I, change to normal i.

pawn Код:
stock IllegalCarNitroIde(carmodel) {

    new illegalvehs[29] = { 581, 523, 462, 521, 463, 522, 461, 448, 468, 586, 509, 481, 510, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454, 590, 569, 537, 538, 570, 449 };
   
    for(new i = 0; i < sizeof(illegalvehs); ++i) {
        if (carmodel == illegalvehs[I]) return true; //this line
    }
    return false;
}



Re: Help error - ajam123 - 23.03.2013

Thanks to PaulDinam & kamzaf. +Rep for help