SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 22/07/2009, 11:13 AM   #1
FreddeN
Huge Clucker
 
Join Date: May 2009
Posts: 370
Reputation: 0
Default [HELP] Two annoying warnings

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
FreddeN is offline  
Old 22/07/2009, 11:19 AM   #2
James_Alex
Gangsta
 
Join Date: Dec 2008
Posts: 570
Reputation: 0
Default Re: [HELP] Two annoying warnings

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
James_Alex is offline  
Old 22/07/2009, 11:21 AM   #3
Donny_k
Gangsta
 
Donny_k's Avatar
 
Join Date: May 2006
Posts: 786
Reputation: 4
Default Re: [HELP] Two annoying warnings

If they are not being called remotely and are not being fired by timers then remove the 'public'.
__________________
We don't stop playing because we grow old, we grow old because we stop playing.
Donny_k is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Annoying bug [NTX]MikeQ Client Support 9 02/06/2010 10:10 PM
Annoying... Mike Garber Help Archive 10 27/09/2009 12:26 PM
Need help from Warnings SOOOO ANNOYING! narutogeek11 Help Archive 9 11/03/2009 09:18 PM
Annoying Warnings... introzen Help Archive 1 10/03/2009 02:59 PM
Annoying ban bug Bogdan Cirstea Server Support 5 07/12/2008 01:37 PM


All times are GMT. The time now is 04:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.