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



[HELP] Tag Mismatch [+rep] - Nuke547 - 17.03.2012

This is where the tag mismatch is

pawn Код:
TextDrawSetString(sdisplay[playerid], string); // The actual changing of the textdraw
This is the string.
pawn Код:
format(string, sizeof(string), "%i MPH", s2[playerid]); // The textdraw string
This is the sdisplay.
pawn Код:
sdisplay[playerid] = TextDrawSetString(Speedometer[playerid], " ");
Help please!


Re: [HELP] Tag Mismatch [+rep] - MP2 - 17.03.2012

TextDrawSetString doesn't return anything. If you're trying to store the textdraw's ID you need to do this:

pawn Код:
new Text:sdisplay[MAX_PLAYERS];


sdisplay[playerid] = TextDrawCreate(..);

format()
TextDrawSetString(sdisplay[playerid], string);