SA-MP Forums Archive
Warnings [+rep] - 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: Warnings [+rep] (/showthread.php?tid=363610)



Warnings [+rep] - umarmalik - 28.07.2012

I have problem with warning "tag mismatch and number of arguments does not match definition". Can any one help me.

Here is the code:
pawn Код:
TextDrawSetString(Textdraw4[playerid],string); // tag mismatch
TextDrawShowForPlayer(playerid,Textdraw4[playerid]);  // tag mismatch
TextDrawDestroy(Textdraw4[playerid]); // tag mismatch
Textdraw4[i] = TextDrawCreate(86.000000, 428.000000, " "); // tag mismatch
TextDrawAlignment(Textdraw4[i], 2); // tag mismatch
TextDrawBackgroundColor(Textdraw4[i], 255); // tag mismatch
TextDrawFont(Textdraw4[i], 2); // tag mismatch
TextDrawLetterSize(Textdraw4[i],0.280000, 1.100000); // tag mismatch
TextDrawColor(Textdraw4[i], -1); // tag mismatch
TextDrawSetOutline(Textdraw4[i], 1); // tag mismatch
TextDrawSetProportional(Textdraw4[i], 1); // tag mismatch


forward Prisond(playerid);
public Prisond(playerid)
{
new rand;
rand = random(sizeof(gPrisonSpawns));
DOO_SetPlayerPos(playerid, gPrisonSpawns[rand][0],gPrisonSpawns[rand][1], gPrisonSpawns[rand][2], gPrisonSpawns[rand][3], gPrisonSpawns[rand][4], gPrisonSpawns[rand][5], gPrisonSpawns[rand][6], gPrisonSpawns[rand][7], gPrisonSpawns[rand][8]); // number of arguments does not match definition
return 1;
}



Re: Warnings [+rep] - Cjgogo - 28.07.2012

You must have at top of your gamemode:
pawn Код:
new Text:Textdraw4[MAX_PLAYERS];



Re: Warnings [+rep] - StrangeLove - 28.07.2012

Follow the format of the functions so will not get warnings. (https://sampwiki.blast.hk/wiki/TextDrawSetString)


Re: Warnings [+rep] - umarmalik - 28.07.2012

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
You must have at top of your gamemode:
pawn Код:
new Text:Textdraw4[MAX_PLAYERS];
Thanks Cjgogo, Tag mismatch fixed.. Now help me with "number of arguments does not match definition".


Re: Warnings [+rep] - Akira297 - 28.07.2012

The reason why it says
Код:
invalid number of arguments does not match definition
Is because more than likely, you don't have 8 random spawn points for the gPrison spawn location.


Re: Warnings [+rep] - TheDeath - 28.07.2012

Quote:
Originally Posted by MrSurfur1
Посмотреть сообщение
Follow the format of the functions so will not get warnings. (https://sampwiki.blast.hk/wiki/TextDrawSetString)
Do What MrSurfur said do it with all functions follow all funtions format !


Re: Warnings [+rep] - Cjgogo - 28.07.2012

Quote:
Originally Posted by TheDeath
Посмотреть сообщение
Do What MrSurfur said do it with all functions follow all funtions format !
He did follow the format,and he fixed those errors,read more carefully...


Re: Warnings [+rep] - umarmalik - 28.07.2012

Quote:
Originally Posted by Akira297
Посмотреть сообщение
The reason why it says
Код:
invalid number of arguments does not match definition
Is because more than likely, you don't have 8 random spawn points for the gPrison spawn location.
I have that:
Код:
new Float:gPrisonSpawns[8][10] = {
	{157.3793,-203.4345,342.9255},
	{162.1676,-202.7620,342.9255},
	{171.3522,-182.2133,346.9245},
	{166.1989,-182.3452,346.9245},
	{167.2288,-202.7806,346.9321},
	{162.6096,-202.5095,346.9330},
	{162.4220,-182.0654,342.9255},
	{157.6658,-181.8451,342.9255}
};