Positioning help.
#1

Alright, so I'm not sure if I'm doing this right or not, but I'm pretty sure it's correct but it seems that I've got a tag-mismatch where I can't notice, if anyone has a solution to fix this or advice on a correct method, please comment here with your help.

Don't worry about the indentation, it messes up when you post it on these forums.

Command Line:
Код:
COMMAND:startcustomevent(playerid, params[])
{
	new string[256], text[256];
	if(sscanf(params, "s[256]", text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /startcustomevent [Event Name]");
	else
	{
	    if(PlayerInfo[playerid][pAdmin] >= 1)
	    {
	        new Float:X, Float:Y, Float:Z;
	        GetPlayerPos(playerid, X, Y, Z);
	    	format(string, sizeof(string), "%s %s has started the %s event, private message an online administrator to participate.", GetAdminLvlName(playerid), GetName(playerid), text);
	    	SendClientMessageToAll(COLOR_GREY, string);
	    	foreach (Player, i)
	    	{
	    	    EventInfo[i][ePosX] = X;
	    	}
		}
		else SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command");
	}
	return 1;
}
Error message:

Код:
C:\Users\Mike\Desktop\Scripting\gamemodes\nWo.pwn(2869) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

What is the line 2869?
Reply
#3

These warnings can be VERY annoying.

pawn Код:
COMMAND:startcustomevent(playerid, params[])
{
    new string[256], text[256];
    if(sscanf(params, "s[256]", text)) SendClientMessage(playerid, COLOR_GREY, "USAGE: /startcustomevent [Event Name]");
    else
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            new Float:X, Float:Y, Float:Z;
            GetPlayerPos(playerid, X, Y, Z);
            format(string, sizeof(string), "%s %s has started the %s event, private message an online administrator to participate.", GetAdminLvlName(playerid), GetName(playerid), text);
            SendClientMessageToAll(COLOR_GREY, string);
            foreach (Player, i)
            {
                new str[15];
                format(str, sizeof(str),"%d",X);
                new stri = strval(str);
                EventInfo[i][ePosX] = stri;
            }
        }
        else SendClientMessage(playerid, COLOR_LIGHTRED, "WARNING: You do not have access to this command");
    }
    return 1;
}
Reply
#4

Just a heads up. Instead of wrapping your code in use [pawn][/pawn], that fixes any issues with indentation.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)