Weird error help - 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: Weird error help (
/showthread.php?tid=211083)
Weird error help -
Outcast - 14.01.2011
Well, I want to compare the numbers from 2 different files. I get the following errors:
pawn Код:
C:\Users\Kreso\Desktop\SAMP Server\gamemodes\vehtest.pwn(83) : error 036: empty statement
C:\Users\Kreso\Desktop\SAMP Server\gamemodes\vehtest.pwn(87) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
This is the code I get the error at:
pawn Код:
for(new i = 0; i < OWNED_CARS; i ++)
{
new file[50];
format(file, sizeof(file), "vehicles/%d.json", i);
if(djInt(file, "player/owner") == djInt("users/Admin.json", "vehicle/ID"));
{
SendClientMessage(playerid, 0x355262, "Welcome to your vehicle");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
Error 83 is at If..., and 87 at Else...
Re: Weird error help -
Steven Paul - 14.01.2011
which is 83 and which is 87
Re: Weird error help -
Outcast - 14.01.2011
I said it already, 83 is at the "If(djInt(..."
and 87 is at "Else"
Re: Weird error help -
Steven Paul - 14.01.2011
if so then try this
pawn Код:
for(new i = 0; i < OWNED_CARS; i ++)
{
new file[50];
format(file, sizeof(file), "vehicles/%d.json", i);
if(djInt(file, "player/owner") == djInt("users/Admin.json", "vehicle/ID"))
{
SendClientMessage(playerid, 0x355262, "Welcome to your vehicle");
}
else
{
RemovePlayerFromVehicle(playerid);
}
}
Re: Weird error help -
Outcast - 14.01.2011
Thanks for the help. It worked. I accidentaly put ";" at the end of "if".
Re: Weird error help -
Steven Paul - 14.01.2011
no problem