[HELP] Two annoying warnings
#1

As I said in another post, I'm having toruble with my register system, I have alot of warnings that I dont got time to fix.
Now I'm trying to fix them, it maybe fixes the reister problem...

Anyway, I got two warnings left I dont understand.

Code:
public function lacks forward declaration (symbol "SetPlayerUnjail")
Code:
public function lacks forward declaration (symbol "PlayerToPoint")
First warning comes from:

Code:
public SetPlayerUnjail()
{
	//new plname[MAX_PLAYER_NAME];
	//new string[256];
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
	if(PlayerInfo[i][pJailed] > 0)
		  {
				if(PlayerInfo[i][pJailTime] > 0)
				{
					PlayerInfo[i][pJailTime]--;
				}
				if(PlayerInfo[i][pJailTime] <= 0)
				{
				  PlayerInfo[i][pJailTime] = 0;
					if(PlayerInfo[i][pJailed] == 1)
					{
						SetPlayerInterior(i, 6);
						SetPlayerPos(i,264.6288,77.5742,1001.0391);
					}
					else if(PlayerInfo[i][pJailed] == 2)
					{
						SetPlayerInterior(i, 6);
						SetPlayerPos(i,264.6288,77.5742,1001.0391);
					}
					PlayerInfo[i][pJailed] = 0;
					SendClientMessage(i, COLOR_RED,"You have completed your jail time, be good now!");
					SetPlayerInterior(i, 0);
					SetPlayerPos(i,1542.8196,-1675.5737,13.5552);

				}
			}
	}
}
Second Warning:

Code:
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
  if(IsPlayerConnected(playerid))
	{
		new Float:oldposx, Float:oldposy, Float:oldposz;
		new Float:tempposx, Float:tempposy, Float:tempposz;
		GetPlayerPos(playerid, oldposx, oldposy, oldposz);
		tempposx = (oldposx -x);
		tempposy = (oldposy -y);
		tempposz = (oldposz -z);
		//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
		if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
		{
			return 1;
		}
	}
	return 0;
}
Thanks
Reply
#2

use
pawn Code:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
and
pawn Code:
forward SetPlayerUnjail();
in the top of the script
Reply
#3

If they are not being called remotely and are not being fired by timers then remove the 'public'.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)