Jump to content
  • 0

Probleme de la o comanda.


Gutza

Question

Salut recent am gasit un sistem de Trivia pe care am vrut sa-l testez, toate bune si frumoase,dar din cauza la comanda imi da niste erori

https://pastebin.com/bC9yW8C9

D:\RPG\gamemodes\gm.pwn(28415) : error 017: undefined symbol "cmdtext"
D:\RPG\gamemodes\gm.pwn(28416) : error 017: undefined symbol "idx"
D:\RPG\gamemodes\gm.pwn(28416) : error 029: invalid expression, assumed zero
D:\RPG\gamemodes\gm.pwn(28416) : error 029: invalid expression, assumed zero
D:\RPG\gamemodes\gm.pwn(28416) : fatal error 107: too many error messages on one line

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

nu stiu sigur daca va functiona dar incearca sa pui new idx; si sa inlocuiesti cmdtext cu params

Citat
Link to comment
Share on other sites

  • 0

Trebuie sa folosesti sscanf. Modalitatea pe care o ai acolo este abordarea pentru comenzile pe OnPlayerCommandText (antice)

Revin cu edit sa iti arat cum

Edit:

CMD:an(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        new result[129];
        if(sscanf(params, "s[129]", result)) return SendClientMessage(playerid, COLOR_GRAD2, "Use: /an [raspuns]");

        if(TriviaQ == -1)
        {
            SendClientMessage(playerid, COLOR_WHITE, "Nici un event trivia disponibil");
            return 1;
        }
        if( strcmp(result,Raspuns[TriviaQ],true) == 0 )
        {
            SendClientMessage(playerid, COLOR_WHITE, "Raspuns Bun");
            TriviaQ = -1;
        }
        else
        {
            //Raspuns Gresit
        }
    }
    return 1;
}

 

Edited by Banditul
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.