SA-MP Forums Archive
Please help - 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)
+--- Thread: Please help (/showthread.php?tid=575619)



Please help - MouizGhouri - 28.05.2015

I was making a random messages script but i got some warnings:
Код:
C:\Users\Mouiz\Desktop\Updating\freeroam.pwn(537) : warning 235: public function lacks forward declaration (symbol "RandomMessage")
C:\Users\Mouiz\Desktop\Updating\freeroam.pwn(539) : warning 213: tag mismatch
Script:
Код:
enum ServerData
{
     Announce,
};
////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////
new Text:Announcements;

new RandomMessages[][] =
{
	"~w~Currently Updated To ~a~FR - FreeRoam Build 3 (0.3.7)",
	"~w~Want to get more features?~g~Donate To Become VIP At ~w~forum-mfe.webatu.com",
	"Join our community forum,stay updated. ~w~ Visit forum-mfe.webatu.com"
};

////////////////////////////////////////////////////////////////////////////////

public RandomMessage()
{
	if(ServerInfo[Announce] == 1)
 	TextDrawSetString(Announcements, RandomMessages[random(sizeof(RandomMessages))]);
 	return 1;
}
////////////////////////////////////////////////////////////////////////////////



Re: Please help - Azula - 28.05.2015

the comma ','
Код:
enum ServerData
{
     Announce,
};



Re: Please help - MotherDucker - 28.05.2015

You also need to add
Код:
forward RandomMessage();



Re: Please help - MouizGhouri - 28.05.2015

Thanks guys,
Its fixed now.