Problem with public OnPlayerStateChange
#1

Well i have error about OnPlayerStateChange.

This is the code

Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new vehicleid = GetPlayerVehicleID(playerid);
	if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
	{
	    if(vehicleid == valo)
	    {
	        if(strcmp(PlayerName(playerid)," Valo_Xhan", true) != 0)
	        {
	            RemovePlayerFromVehicle(playerid);
	            SendClientMessage(playerid, COLOR_RED, "This vehicle belongs to Valo, better get away fast.");
         	}
		}
        stock PlayerName(playerid)
		{
			new PlrName[MAX_PLAYER_NAME];
			GetPlayerName(playerid,PlrName,sizeof(PlrName));
			return PlrName;
		}
		return 1;
	}
}
And i got this 5 error:
Код:
D:\Test server\filterscripts\Valox.pwn(118) : error 017: undefined symbol "PlayerName"
D:\Test server\filterscripts\Valox.pwn(121) : error 029: invalid expression, assumed zero
D:\Test server\filterscripts\Valox.pwn(121) : warning 215: expression has no effect
D:\Test server\filterscripts\Valox.pwn(121) : error 001: expected token: ";", but found ")"
D:\Test server\filterscripts\Valox.pwn(121) : error 029: invalid expression, assumed zero
D:\Test server\filterscripts\Valox.pwn(121) : fatal error 107: too many error messages on one line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)