SA-MP Forums Archive
bool mysql to bool pawn variable. - 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: bool mysql to bool pawn variable. (/showthread.php?tid=421191)



bool mysql to bool pawn variable. - shady001 - 08.03.2013

so i have :
pawn Код:
bool:SpawnDance,
I have declared it boolean in mysql.
And here is how i take it from mysql:
pawn Код:
cache_get_row(0, 104, tmp);PlayerInfo[playerid][SpawnDance] = strval(tmp);
and i get this warning :
pawn Код:
shady.pwn(12361) : warning 213: tag mismatch
what should i put instead of
pawn Код:
strval()
to be right and don't get this warning ?


Re: bool mysql to bool pawn variable. - MP2 - 08.03.2013

https://sampforum.blast.hk/showthread.php?tid=216730



So:

pawn Код:
PlayerInfo[playerid][SpawnDance] = !!strval(tmp);
I guess.


Re: bool mysql to bool pawn variable. - shady001 - 08.03.2013

It worked ! Thanks !


Re: bool mysql to bool pawn variable. - MP2 - 08.03.2013

No problem.