SA-MP Forums Archive
Tag mismatch - explaination please.... - 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 - explaination please.... (/showthread.php?tid=428456)



Tag mismatch - explaination please.... - joao0945 - 05.04.2013

pawn Код:
SetPlayerSkin(playerid, gSelectionItemsTag[playerid][selecteditem]);
        new Float:dinheiro, Float:preco = 100;
        new Float:ndinheiro;
        dinheiro = GetPlayerMoney(playerid);
        ndinheiro = floatsub(dinheiro, preco);
        ResetPlayerMoney(playerid);
        GivePlayerMoney(playerid, ndinheiro); //WARN here <---
        return;
Quote:

XxxxXX.pwn(684) : warning 213: tag mismatch

Some help? and explain pls.
Oh, and if someone can tell to me how to subtract money withiout this "thing"


Re: Tag mismatch - explaination please.... - Bakr - 05.04.2013

You are passing a float when you should be passing an integer. You could cast it as well, or just use the subtract operator instead of floatsub().


Re: Tag mismatch - explaination please.... - iJumbo - 05.04.2013

pawn Код:
GivePlayerMoney(playerid,GetPlayerMoney(playerid) - amount of money to subtract);



Re: Tag mismatch - explaination please.... - mastermax7777 - 05.04.2013

floatround(ndinheiro)


Re: Tag mismatch - explaination please.... - Vince - 05.04.2013

Use English variable names. Okay? Thanks!


Re: Tag mismatch - explaination please.... - mastermax7777 - 05.04.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
Use English variable names. Okay? Thanks!
learn other language, ok thanks


Re: Tag mismatch - explaination please.... - iJumbo - 05.04.2013

its not hard to translate script and paste it here


Re: Tag mismatch - explaination please.... - Basssiiie - 06.04.2013

GetPlayerMoney returns an integer. Saving an integer in a float variable won't work.

Quote:
Originally Posted by mastermax7777
Посмотреть сообщение
learn other language, ok thanks
If someone wants answers from English people, it would be very nice if English variables were used. If people want to post Portuguese (I'm guessing this is Portuguese) variables in the Portuguese subforum, they're free to do so. But as long as this is an English forum, we would very much like to see English variable and function names.


Re: Tag mismatch - explaination please.... - MP2 - 06.04.2013

I agree you should use English. The functions are English; it makes sense. That's like writing a book, making the title and the chapters one language then the main page a different language.