(623) : warning 209: function "OnPlayerCommandText" should return a value
#2

Line 623, the error says it all. OnPlayerCommandText is supposed to return a value.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/vehicle", true))
    {
        //Your stuff
        return 1;
        // Returning 1 informs the server that the command has been processed.
        // OnPlayerCommandText won't be called in other scripts.
    }
    return 0; //<!--- This is what you are missing.
    // Returning 0 informs the server that the command hasn't been processed by this script.
    // OnPlayerCommandText will be called in other scripts until one returns 1.
    // If no scripts return 1, the 'SERVER: Unknown Command' message will be shown to the player.
}
-----------------------------------------------------------------------

Line 637:
GameTextForPlayer has more arguments than just two.

Код:
GameTextForPlayer(playerid, "Text", 5000, 2);
Reply


Messages In This Thread
Nevermind - by Triggerz - 21.01.2017, 18:18
Re: (623) : warning 209: function "OnPlayerCommandText" should return a value - by Codeah - 21.01.2017, 19:12
Re: (623) : warning 209: function "OnPlayerCommandText" should return a value - by Triggerz - 21.01.2017, 19:19
Re: (623) : warning 209: function "OnPlayerCommandText" should return a value - by Triggerz - 21.01.2017, 21:03
Re: (623) : warning 209: function "OnPlayerCommandText" should return a value - by Yaa - 21.01.2017, 21:17

Forum Jump:


Users browsing this thread: 2 Guest(s)