Why do i get this error?.
#1

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"
Reply
#2

Did you define the symbol for playerid?
Reply
#3

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)