Can someone explain me why i get this error...i don't quit understand it
#1

pawn Код:
new name[25] = "Hello!";
    new name2[25] = "Loler";
    if (name != name2) RemovePlayerFromVehicle(playerid);
Код:
error 033: array must be indexed (variable "name")
this was a test code...and idk why doesn't it work? with strcmp it works..
Reply
#2

Its just a pawn problem. Strings can be seen as array of ints, representing the single chars.
And the '!=' just cant compare whole arrays.
Reply
#3

pawn Код:
new name[25] = "Hello!";
new name2[25] = "Loler";
if(strcmp(name,name2,false)) RemovePlayerFromVehicle(playerid);
Try this.
Reply
#4

Quote:
Originally Posted by Mauzen
Its just a pawn problem. Strings can be seen as array of ints, representing the single chars.
And the '!=' just cant compare whole arrays.
ty for the explanation
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)