Warning, Tag mismatch
#1

Hello,

Im getting a Warning, I'm doing a TextDraw for an /arrest command, everything is working perfect, but I still have this warning in PAWNO.

Here is everything
Код:
C:\Users\Dan\Desktop\samp03e_svr_R2_win32 - Copy\gamemodes\Gamemode.pwn(2961) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Here's my Script

Код:
                                                        SendClientMessage(id, 0xFF0000AA, "You have been arrested and put in jail");
				  			SetPlayerPos(id, 197.6661,173.8179,1003.0234);
	         					SetPlayerInterior(id, 3);
	         					format(string1, sizeof(string1), "%s(%d) Has Been Aarrested By Officer %s(%d)", aname, id, pname, playerid2);
							SendClientMessageToAll(0xFF0000AA, string1);
			  			        SendClientMessage(playerid2, 0xFF0000AA, "You have received $4000 For the Arrest.");
		  			                GivePlayerMoney(playerid2, 4000);
		  					SetPlayerScore(playerid2,GetPlayerScore(playerid)+1);
		  					JailTime[id] = 60;
			  				SetPlayerWantedLevel(playerid, 0);
			  				CountdownTextDraw(playerid, JailTextDraw, 60);

public CountdownTextDraw(playerid, Text:textid, secondstocount)
{
	if(secondstocount == 0) { TextDrawHideForPlayer(playerid, textid), SpawnPlayer(playerid), SetPlayerInterior(playerid, 0), SendClientMessage(playerid, 0x00FF00FF, "You have been Released!");
		}
		else
		{
			new timestring[32];
			format(timestring, sizeof(timestring), "%i seconds remaining..", secondstocount);
			TextDrawSetString(textid, timestring);
			TextDrawShowForPlayer(playerid, textid);
			secondstocount--;
			SetTimerEx("CountdownTextDraw", 1000, false, "ddd", playerid, textid, secondstocount);
		}
	return 1;
}
The Warning is on.

Код:
SetTimerEx("CountdownTextDraw", 1000, false, "ddd", playerid, textid, secondstocount);
I know its suppose to be set out as

Код:
SetTimerEx("message", 1000, false, "is", 1337, "hello!");
If I use that it doesn't Count down the seconds it just stays on the number I have set , is there a different way to script this...
Reply
#2

Try this Codee here from Wiki SA:MP (its maybe the same like yours but watch if you did something wrong!

Код:
forward message(second, msg[]);
 
public OnGameModeInit()
{
    print("Starting timer...");
    SetTimerEx("message", 1000, false, "is", 1337, "hello!");
}
 
public message(second, msg[])
{
    printf("%i second has passed, also we have a message: %s", second, msg);
    return 1;
}
Reply
#3

One of you variables you probably made is indexed.
Example "[playerid]" or a string or a array

Show how u made the variables: textid , secondstocount
Reply
#4

Solved
Reply
#5

Try this instead:

pawn Код:
SetTimerEx("CountdownTextDraw", 1000, false, "ddd", playerid, _:textid, secondstocount);
Reply
#6

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Try this instead:

pawn Код:
SetTimerEx("CountdownTextDraw", 1000, false, "ddd", playerid, _:textid, secondstocount);
You genius Emmet, Worked straight away, Cheers!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)