Jump to content
  • 0

Probleme de la o comanda.


Question

Posted

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

 

3 answers to this question

Recommended Posts

  • 0
Posted

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

Citat
  • 0
Posted
Acum 25 minute, SherKan a spus:

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

Nu a mers din pacate :(((


 

  • 0
Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.