SA-MP Forums Archive
Error - 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 (/showthread.php?tid=600897)



Error - ManGoe - 14.02.2016

Hello when the message is as it is there's no error when i add an info message it says
SS/Core/Server/InfoMessage.pwn(19 -- 22) : error 035: argument type mismatch (argument 3)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

pawn Код:
#include <YSI\y_hooks>


#define MAX_INFO_MESSAGE            (320)
#define MAX_INFO_MESSAGE_LEN        (256)


static
        ifm_Messages[MAX_INFO_MESSAGE][MAX_INFO_MESSAGE_LEN],
        ifm_Total,
        ifm_Interval,
        ifm_Current;


hook OnScriptInit()
{
    print("\n[OnScriptInit] Initialising 'InfoMessage'...");

    GetSettingStringArray(
        "infomessage/messages",
        "Welcome to Scavenge and survive, Made by Mangoes and Southclaw",
        MAX_INFO_MESSAGE,
        ifm_Messages,
        ifm_Total,
        MAX_INFO_MESSAGE_LEN);

    GetSettingInt("infomessage/interval", 5, ifm_Interval);

    defer InfoMessage();
}

timer InfoMessage[ifm_Interval * 60000]()
{
    if(ifm_Current >= ifm_Total)
        ifm_Current = 0;

    MsgAll(YELLOW, sprintf(" >  "C_BLUE"%s", ifm_Messages[ifm_Current]));

    ifm_Current++;

    defer InfoMessage();
}



Re: Error - ManGoe - 14.02.2016

Bump...


Re: Error - BiosMarcel - 14.02.2016

what line exactly is the error in?

"MAX_INFO_MESSAGE," may that be it?


Re: Error - ManGoe - 15.02.2016

"Welcome to Scavenge and survive, Made by Mangoes and Southclaw",
When i add a message next to that ^^^^^


Re: Error - iKarim - 15.02.2016

PHP код:
GetSettingStringArray(
        
"infomessage/messages",
        
"Welcome to Scavenge and survive, Made by Mangoes and Southclaw",
        
MAX_INFO_MESSAGE,
        
ifm_Messages,
        
ifm_Total,
        
MAX_INFO_MESSAGE_LEN); 
What is this? I'm pretty sure it causes the error.


Re: Error - Amunra - 15.02.2016

Quote:

GetSettingStringArray(
"infomessage/messages",
"Welcome to Scavenge and survive, Made by Mangoes and Southclaw",
MAX_INFO_MESSAGE,
ifm_Messages,
ifm_Total,
MAX_INFO_MESSAGE_LEN);

Maybe See Again your Variable..Example:
Quote:

SendClientMessage(playerid,-1,);//Error is argument type mismatch (argument 3)
return 1;//But Must Send....(playerid,-1,"Test");




Re: Error - ManGoe - 15.02.2016

No but look,
When its
"infomessage/messages",
"Welcome to Scavenge and survive, Made by Mangoes and Southclaw",
It compiles fine
And when its
"infomessage/messages",
"Welcome to Scavenge and survive, Made by Mangoes and Southclaw",
"Want to donate? Contact ManGoE on forums",
IT fucks up..