Help please.
#1

I got this code:
Код:
public Spectator()
{
	new string[350];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(Spectate[i] != 255)
			{
				new targetid = Spectate[i];
				if(IsPlayerConnected(targetid))
				{
				    if(PlayerInfo[i][pAdmin] >= 1)
				    {
				        new Float:health,Float:armour,Float:health2;
					    new name[MAX_PLAYER_NAME];
					    new money = GetPlayerMoney(targetid);
					    new carid = GetPlayerVehicleID(targetid);
					    new kmh = GetPlayerSpeed(targetid, true);
					    new bankmoney = PlayerInfo[targetid][pAccount];
					    GetPlayerName(targetid, name, sizeof(name));
					    GetPlayerHealth(targetid, health);
					    GetPlayerArmour(targetid, armour);
					    GetVehicleHealth(carid, health2);
					    if(!IsPlayerInAnyVehicle(targetid))
					    {
					        format(string, sizeof(string),"~p~- ~h~%s (ID: %d) ~p~-~n~~n~~n~ ~b~Health: ~w~%.1f ~g~:-: ~b~Armour: ~w~%.1f ~n~ ~b~Money: ~w~$%d ~g~:-: ~b~Bank: ~w~$%d",name,targetid,health,armour,money,bankmoney);
						    TextDrawSetString(Textdraw54[i],string);
						}
						else
						{
						    format(string, sizeof(string),"~p~- ~h~%s (ID: %d) ~p~-~n~~n~~n~ ~b~Health: ~w~%.1f ~g~:-: ~b~Armour: ~w~%.1f ~n~ ~b~Money: ~w~$%d ~g~:-: ~b~Bank: ~w~$%d ~n~~n~~g~---------------------------------------------------~n~~n~ ~b~Vehicle ID: ~w~%d ~b~Vehicle HP: ~w~%.1f ~n~~n~~b~Speed: ~w~%d",name,targetid,health,armour,money,bankmoney,carid,health2,kmh);
						    TextDrawSetString(Textdraw54[i],string);
						}
				    }
					if(GetPlayerInterior(targetid) > 0)
					{
						SafeSetPlayerInterior(i,GetPlayerInterior(targetid));
					}
					if(GetPlayerVirtualWorld(targetid) > 0)
					{
						SetPlayerVirtualWorld(i,GetPlayerVirtualWorld(targetid));
					}
				}//Targetid connected
			}
		}
	}
}
And I get this error:
Код:
F:\Games\Game-Mode\...\...\gamemodes\riv.pwn(3319) : error 004: function "SafeSetPlayerInterior" is not implemented
How can I fix it?
Reply
#2

This error is given because you have forwarded SafeSetPlayerInterior, but you don't have the public function in the script.
Reply
#3

And how to solve it?
Reply
#4

You got SafeSetPlayerInterior from somewhere, so it should have the public function there as well.

Look for something like:
pawn Код:
public SafeSetPlayerInterior( ... ) // parameters..
{
    // code..
}
and if you find it, then add it to your script (after the forward line).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)