/announce command with ZCMD -.-
#1

I am pretty new on scripting, and learning commands with ZMCD.
I have failed my command after a lot of different attempts, and if someone could help me with fixing it I'd really appreciate it!

So, I get these errors;
Quote:

G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(283) : error 035: argument type mismatch (argument 2)
G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(287) : error 035: argument type mismatch (argument 2)
G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(289) : error 035: argument type mismatch (argument 2)
G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(291) : error 035: argument type mismatch (argument 2)
G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(292) : warning 209: function "cmd_announce" should return a value
G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(293) : error 010: invalid function or declaration
G:\Documents and Settings\Administrator\Desktop\Gta Scripting\DM test\gamemodes\test.pwn(294) : error 010: invalid function or declaration

And this is a code..

pawn Код:
COMMAND:announce(playerid, params[])
{
    if(!IsPlayerAdmin(playerid))
    {
        new text[64], time, style;
        if (sscanf(params, "iis[64]", style, time, text))
            {
                if (strlen(text) > 64)
                {
                     if(style == 2)
                     {
                        if (style < 0 || style > 6)
                        {
                            if (time > 20*1000)
                            GameTextForAll(text, time, style);
                            }
                            else return SendClientMessage(playerid,"No longer than 20 seconds");
                        }
                        else return SendClientMessage(playerid,0x854900FF,"Invalid style");
                     }
                    else return SendClientMessage(playerid,"Bug with style 2! Do not use it!");
                }
                else return SendClientMessage(playerid,"Message too long, please make it with less than 64 letters!");
            }
            else return SendClientMessage(playerid,"Usage: /announce <style[0-6]> <time in ms> <text>");
    }
    else return SendClientMessage(playerid,''Only RCON Adminstrator can use this!''
    return 1;
}
What is wrong with it?
Reply


Messages In This Thread
/announce command with ZCMD -.- - by Armqus_FIN - 28.11.2011, 13:27
Re: /announce command with ZCMD -.- - by SmiT - 28.11.2011, 13:30
Re: /announce command with ZCMD -.- - by Armqus_FIN - 28.11.2011, 13:38
Re: /announce command with ZCMD -.- - by Kostas' - 28.11.2011, 13:38
Re: /announce command with ZCMD -.- - by Armqus_FIN - 28.11.2011, 13:42
Re: /announce command with ZCMD -.- - by Kostas' - 28.11.2011, 13:45
Re: /announce command with ZCMD -.- - by |_ⒾⓇⓄN_ⒹⓄG_| - 28.11.2011, 13:49
Re: /announce command with ZCMD -.- - by ellyx - 28.11.2011, 13:54
Re: /announce command with ZCMD -.- - by Armqus_FIN - 28.11.2011, 14:09
Re: /announce command with ZCMD -.- - by Kostas' - 28.11.2011, 14:10

Forum Jump:


Users browsing this thread: 1 Guest(s)