SA-MP Forums Archive
Invalid Expression, assume zero - 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: Invalid Expression, assume zero (/showthread.php?tid=90010)



Invalid Expression, assume zero - AcId n RaPiD - 05.08.2009

I'm making a seatbelt filterscript. So, I added in line 124 so that when a player is not in a car and they type /seatbelt they receive a client message which tells them, "You need to be in a vehicle in order to use /seatbelt". Everything is okay, but I get invalid expression, assume zero... which is annoying. Here's the error.

Код:
C:\Users\User\Desktop\SAMP Script #2\pawno\seatbelt.pwn(124) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And here's the code.


pawn Код:
result[idx - offset] = EOS;
if(!strlen(result) && IsPlayerInAnyVehicle(playerid) == 0
{ //line 124
    SendClientMessage(playerid, COLOR_GRAD2, "You need to be in a vehicle in order to use /seatbelt.");
    return 1;
}



Re: Invalid Expression, assume zero - Rokis - 05.08.2009

pawn Код:
result[idx - offset] = EOS;
if(!strlen(result) && IsPlayerInAnyVehicle(playerid) == 0)
{ //line 124
    SendClientMessage(playerid, COLOR_GRAD2, "You need to be in a vehicle in order to use /seatbelt.");
    return 1;
}
try it