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: Tag Mismatch [REP] (
/showthread.php?tid=335032)
Tag Mismatch [REP] -
Nuke547 - 16.04.2012
I am getting a tag mismatch for some reason. I'm not sure why...
Here is the code, and yes, all the positions are Floats...
pawn Код:
gStats[i][LabelID] = Create3DTextLabel(string, COLOR_YELLOW, gStats[i][Ext][0], gStats[i][Ext][1], gStats[i][Ext][2], 100, 0, 0);
Re: Tag Mismatch [REP] -
Jonny5 - 16.04.2012
the 100 should be a float also (the draw distance)
100.0 should do it.
no rep needed here this was simple
regards,
Re: Tag Mismatch [REP] -
Nuke547 - 16.04.2012
I'm still getting the error.
This is how its done for the Ext's...
pawn Код:
mysql_get_field("extx", Query);
gStats[i][Ext][0] = strval(Query);
Its done like that for every single one.
Re: Tag Mismatch [REP] -
Jonny5 - 16.04.2012
according to the wiki
strval can be used to convert a string to an integer.
so its not converting to FLOAT:
try removing the tag as i dont see a function for string to float.
or dig into sscanf and see how ****** converted from string to float.
EDIT: Look BELOW!!
good one roach, i see i have lots to learn still...
and also i didnt see this functions but thxs
Quote:
Originally Posted by [Diablo]
|
Re: Tag Mismatch [REP] -
aRoach - 16.04.2012
Or:
pawn Код:
gStats[i][Ext][0] = floatstr(Query);
Re: Tag Mismatch [REP] -
[Diablo] - 16.04.2012
Quote:
Originally Posted by Jonny5
according to the wiki
strval can be used to convert a string to an integer.
so its not converting to FLOAT:
try removing the tag as i dont see a function for string to float.
or dig into sscanf and see how ****** converted from string to float.
|
https://sampwiki.blast.hk/wiki/Floatstr
Re: Tag Mismatch [REP] -
Nuke547 - 16.04.2012
I fixed it. In the enum, I forgot to do Text3D: LabelID,
Sorry! And thanks for anybody who helped