Need help error 017: undefined symbol "wheelmodels@YSII_Ag"
#1

Need help
(4937 : error 017: undefined symbol "wheelmodels@YSII_Ag"
(4937 : error 017: undefined symbol "wheelmodels@YSII_Ag"
(4937 : error 029: invalid expression, assumed zero
(4937 : 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) { // THIS LINE!
        if (modelid == wheelmodels[I])
        return true;

    }
    return false;
}
Reply
#2

Read the foreach documentation before actually using it.
Reply
#3

y_iterate works a little diffrent than you think. You should use normal for loop in this case
Reply
#4

Umm could you give me some clue how to fix that?
Reply
#5

pawn Код:
for(new i = 0; i < sizeof(wheelmodels); i++)
{
https://sampwiki.blast.hk/wiki/Loops
Reply
#6

Because it's a static list, you don't have a reason to even use iterator.
pawn Код:
for(new i = 0; i != sizeof wheelmodels; ++i) { // THIS LINE!
        if (modelid == wheelmodels[i]) return true;
}
Reply
#7

Thanks for clue
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)