Tag mismatch... Why? - 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... Why? (
/showthread.php?tid=545811)
Tag mismatch... Why? -
Baltimore - 10.11.2014
Hello!
I have a warning in this ligne:
pawn Код:
new prixvente = MaisonInfo[maisonid][Prix]/1.5;
Why? x)
Thx
Re: Tag mismatch... Why? -
Dziugsas - 10.11.2014
Код:
new Float:prixvente = MaisonInfo[maisonid][Prix]/1.5;
?
Re: Tag mismatch... Why? -
Kwarde - 10.11.2014
Indeed, it should be a float. And as Dziugsas failed to explain why (I personally don't think you actually learn by just getting the answer);
You divided this value by
1.5. You know you have integers (0, 1, 2, 3, 4, 5 etc). These don't have commas. Float however do use that. If you would've tried to divide it by 2, it wouldn't give this tag mismatch error (you may check it if you'd like - it'd be a nice learn moment).