SA-MP Forums Archive
warning 202 help - 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: warning 202 help (/showthread.php?tid=514031)



warning 202 help - extror3 - 19.05.2014

Hi, i have tried to update my script abit, uploaded the script with warning 202 (warning 202: number of arguments does not match definition) and the whole server crashed because of this error.

hereґs the code:
Код:
forward OnPlayerLogin(playerid);
forward OnPlayerLoginAttempt(playerid);

public OnLoginAttempt(playerid) {

    .........

    OnPlayerLogin(playerid);
    return 1;
}

public OnPlayerLogin(playerid) {

    ...........

    return 1;
}
it gives an warning on "OnPlayerLogin(playerid);" (Line 972). Anyone who can help me?


Re: warning 202 help - extror3 - 19.05.2014

I added the ......... Just to save space and be more easier to read. I havent added any.... In the real code. But when complie it set an error in "OnPlayerLogin(playerid);"


Re: warning 202 help - JFF - 19.05.2014

Try this

pawn Код:
forward OnPlayerLogin(playerid);
forward OnPlayerLoginAttempt(playerid);

public OnLoginAttempt(playerid)
{

    .........

    SetTimerEx("OnPlayerLogin", 100, false, "i", playerid);
    return 1;
}

public OnPlayerLogin(playerid)
{

    ...........

    return 1;
}



AW: warning 202 help - Skimmer - 19.05.2014

OnPlayerLoginAttempt(playerid) does not equals to OnLoginAttempt(playerid)


Re: warning 202 help - extror3 - 19.05.2014

@JFF Thanks, it works now!