Tag mismatch - 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: Tag mismatch (
/showthread.php?tid=509048)
Tag mismatch -
Dziugsas - 25.04.2014
Hello guys!
Код:
: error 035: argument type mismatch (argument 2)
pawn Код:
TextDrawShowForPlayer(i,TDBACK);
TextDrawShowForPlayer(i,PadanguBukle);
TextDrawShowForPlayer(i,PriekineKaire);
TextDrawShowForPlayer(i,PriekineDesine);
TextDrawShowForPlayer(i,Priekines);
TextDrawShowForPlayer(i,Galines);
TextDrawShowForPlayer(i,GalineDesine);
TextDrawShowForPlayer(i,GalineKaire);
Re: Tag mismatch -
Konstantinos - 25.04.2014
Those variables must have
Text: tag when they are declared.
Re: Tag mismatch -
Dziugsas - 25.04.2014
Added like this
pawn Код:
new PlayerText:TDBACK[MAX_PLAYERS];
new PlayerText:PadanguBukle[MAX_PLAYERS];
new PlayerText:PriekineKaire[MAX_PLAYERS];
new PlayerText:PriekineDesine[MAX_PLAYERS];
new PlayerText:Priekines[MAX_PLAYERS];
new PlayerText:Galines[MAX_PLAYERS];
new PlayerText:GalineDesine[MAX_PLAYERS];
new PlayerText:GalineKaire[MAX_PLAYERS];
pawn Код:
TextDrawShowForPlayer(i,Text:TDBACK);
TextDrawShowForPlayer(i,Text:PadanguBukle);
TextDrawShowForPlayer(i,Text:PriekineKaire);
TextDrawShowForPlayer(i,Text:PriekineDesine);
TextDrawShowForPlayer(i,Text:Priekines);
TextDrawShowForPlayer(i,Text:Galines);
TextDrawShowForPlayer(i,Text:GalineDesine);
TextDrawShowForPlayer(i,Text:GalineKaire);
Still same
Re: Tag mismatch -
Konstantinos - 25.04.2014
Those are per-player textdraws so you should use
PlayerTextDrawShow function and the index of the array:
pawn Код:
PlayerTextDrawShow(i, TDBACK[i]);
Do the same for the rest.
Re: Tag mismatch -
Dziugsas - 25.04.2014
Oh... so TextDrawShowForPlayer() is used for global textdraws?
By the way thanks - fixed.
Re: Tag mismatch -
Konstantinos - 25.04.2014
Yes. You can find all the functions for per-player textdraws at the bottom of the page:
https://sampwiki.blast.hk/wiki/CreatePlayerTextDraw