Can someone explain me why i get this error...i don't quit understand it - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Can someone explain me why i get this error...i don't quit understand it (
/showthread.php?tid=145499)
Can someone explain me why i get this error...i don't quit understand it - Micko9 - 02.05.2010
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..
Re: Can someone explain me why i get this error...i don't quit understand it -
Mauzen - 02.05.2010
Its just a pawn problem. Strings can be seen as array of ints, representing the single chars.
And the '!=' just cant compare whole arrays.
Re: Can someone explain me why i get this error...i don't quit understand it -
Zimon95 - 02.05.2010
pawn Код:
new name[25] = "Hello!";
new name2[25] = "Loler";
if(strcmp(name,name2,false)) RemovePlayerFromVehicle(playerid);
Try this.
Re: Can someone explain me why i get this error...i don't quit understand it - Micko9 - 03.05.2010
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