Tag mistach - 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 mistach (
/showthread.php?tid=281088)
Tag mistach -
Wesley221 - 04.09.2011
Im getting a tag mismatch error when im using this code:
pawn Код:
stock FreezePlayer(playerid, toggle)
{
switch( toggle )
{
case 0: TogglePlayerControllable(playerid, 1), Freezed[playerid] = 0;
case 1: TogglePlayerControllable(playerid, 0), Freezed[playerid] = 1;
}
return 1;
}
When im using it in a command like this:
Im getting the tag mismatch, otherwise i dont. The "Player" is defined in the command. What can the problem be?
Edit: The error lines are in
pawn Код:
case 0: TogglePlayerControllable(playerid, 1), Freezed[playerid] = 0;
case 1: TogglePlayerControllable(playerid, 0), Freezed[playerid] = 1;
Re: Tag mistach -
Basicz - 04.09.2011
pawn Код:
stock FreezePlayer( playerid, toggle )
{
TogglePlayerControllable( playerid, !toggle );
Freezed[ playerid ] = toggle;
return 1;
}
I don't know why it can be a ' tag mismatch '.
Tested it in my Gamemode, compiles fine.
tag mismatch is an error if you put integer when the argument is a string, you put a float when the argument is a string, you put a string when the argument is integer, you put a string when the argument is a float.
EDIT: fixed my code
Re: Tag mistach -
Wesley221 - 04.09.2011
Oh wait i know what i did wrong
The variables were booeans, so i did 1, but should be true: tag mismatch
Fixed