SA-MP Forums Archive
error 010: invalid function or declaration - 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: error 010: invalid function or declaration (/showthread.php?tid=375718)



error 010: invalid function or declaration - davelord - 07.09.2012

Код:
C:\Users\Mijn pc\Desktop\Scripting\gamemodes\login.pwn(442) : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\Scripting\gamemodes\login.pwn(445) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Those are the errors, this is the command:

Код:
	CMD:ame(playerid, params[])
	{
	    new
	        string[128],
	        action[100];
	    if(sscanf(params, "s[100]", action))
	    {
	        SendClientMessage(playerid, -1, "USAGE: /ame [message]");
	    }
	    else
	    {
     		format(HeadString, sizeof(HeadString), "%s %s",GetName(playerid), action);
     		Update3DTextLabelText(HeadText[playerid],0xC2A2DFFF,HeadString);
		}
		    format(string, sizeof(string), "=> You %s", action);
            SendClientMessage(playerid,COLOR_ACTION,string);
		}
		return 1;
	}
There are only stocks after it, what did I do wrong?


Re: error 010: invalid function or declaration - Jefff - 07.09.2012

pawn Код:
CMD:ame(playerid, params[])
{
    if(isnull(params))
    {
        SendClientMessage(playerid, -1, "USAGE: /ame [message]");
    }
    else
    {
        format(HeadString, sizeof(HeadString), "%s %s",GetName(playerid), params);
        Update3DTextLabelText(HeadText[playerid],0xC2A2DFFF,HeadString);
        format(HeadString, sizeof(HeadString), "=> You %s", params);
        SendClientMessage(playerid,COLOR_ACTION,HeadString);
    }
    return 1;
}



Re: error 010: invalid function or declaration - Roel - 07.09.2012

Can you give the lines of the error? and did you defined HeadString?