SA-MP Forums Archive
Why do i get this error?. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Why do i get this error?. (/showthread.php?tid=456685)



Why do i get this error?. - QatarKnight - 06.08.2013

I put SetPVarInt so an anti cheat won't kick who fixes their car.

Код:
public Repair()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
	    {
	        new Float:h, Float:vh;
        	if(GetPlayerState(i) == PLAYER_STATE_DRIVER)
        	{
			    GetVehicleHealth(GetPlayerVehicleID(i), vh);
			    h = floatround(vh) / 10;
	        	if(h <= 29.0)
	        	{
					SetVehicleHealth(GetPlayerVehicleID(i), 1000.0);
                    7768:SetPVarInt(playerid, "VehicleRepair", 1);
					RepairVehicle(GetPlayerVehicleID(i));
				}
			}
		}
	}
	return 1;
}
I get this error when trying to compile.
C:\Users\New\Desktop\Current Server2\FunGaming Stunt-Freeroam\gamemodes\fgame.pwn(776 : error 017: undefined symbol "playerid"


Re: Why do i get this error?. - ColorHost-Kevin - 07.08.2013

Did you define the symbol for playerid?


Re: Why do i get this error?. - Jstylezzz - 07.08.2013

I think changing 'playerid' to 'i' would solve the problem here.


Re: Why do i get this error?. - QatarKnight - 07.08.2013

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
I think changing 'playerid' to 'i' would solve the problem here.
Thanks it compiled perfectly +rep for you.