SA-MP Forums Archive
Problem with code. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with code. (/showthread.php?tid=128824)



Problem with code. - Peep - 19.02.2010

Код:
forward ShowJFishes(playerid,targetid);
Код:
public ShowJFishes(playerid,targetid)
{
  if(IsPlayerConnected(playerid))
	{
		new jfish = PlayerInfo[targetid][pJFish];
		new coordsstring[250];
    format(coordsstring, sizeof(coordsstring), "|-----------------FISHES------------------------|");
		SendClientMessage(playerid, COLOR_RED,coordsstring);
		format(coordsstring, sizeof(coordsstring), " -------------You have %s Fishes--------------- ",jfish);
		SendClientMessage(playerid, COLOR_WHITE,coordsstring);
		format(coordsstring, sizeof(coordsstring), "|-----------------------------------------------|");
		SendClientMessage(playerid, COLOR_RED,coordsstring);
	}
}
(44741) : error 017: undefined symbol "targetid"

i have no idea what is wrong .

Can anybody help me ?


Re: Problem with code. - gotenks918 - 19.02.2010

You need to define targetid, i.e. new targetid[MAX_PLAYERS];


Re: Problem with code. - Finn - 19.02.2010

new jfish = PlayerInfo[targetid][pJFish];

>>

new jfish = PlayerInfo[playerid][pJFish];


Re: Problem with code. - Peep - 19.02.2010

thanx for answering i got it work