/server dialog help, [SIMPLE]
#1

Greetings,



Hi, well today I was trying to make a /server command and it open a DIALOG_STYLE_LIST with differents rcon commands like: "exit", "reloadbans" (for me momment).
Okay, but when I complie all that I get this errors

pawn Код:
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(606) : error 031: unknown directive
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(613) : error 017: undefined symbol "DIALOG_SERVER"
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(656) : warning 217: loose indentation
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(657) : error 017: undefined symbol "DIALOG_SERVER"
C:\Users\usuario\Sa-Mp\filterscripts\sql&cmd.pwn(682) : error 030: compound statement not closed at the end of file (started at line 644)
This is my script

pawn Код:
#definfe DIALOG_SERVER
CMD:server(playerid, params[])
{
    if(gPlayerInfo[playerid][pAdmin] >= 4)
    {
        if(!sscanf(params, "u", params[0]))
        {
            ShowPlayerDialog(playerid, DIALOG_SERVER, DIALOG_STYLE_LIST, "[0.3x] ..::DisturBed Games::.. - server 1","Server exit\n Server ReloadBans","SEND","EXIT");
            new string[128];
            format(string, sizeof(string), "ADMINS: %s has entred the main operator server system", GetName(playerid));
            SendMessageToAdmins(COL_ORANGE, string);
        }
    } else SendClientMessage(playerid, -1, "SERVER: You are not allowed to use this command");
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new pName[24], str[128];
    GetPlayerName(playerid, pName, 24);

    if(dialogid == DIALOG_REGISTER)
    {
        if(response)
        {
            SendClientMessage(playerid, -1, "{FFAE00}SERVER: You have registred this account");
            mysql_real_escape_string(inputtext, inputtext,TuberiasMySQL);
            format(str,128, "INSERT INTO users (username, password) VALUES ('%s', '%s')",pName, inputtext);
            mysql_function_query(TuberiasMySQL, str, false, "OnQueryFinish", "iis", 0,playerid,inputtext);
        }
        else
        {
            SendClientMessage(playerid, COL_RED, "KICKED: You must register before to spawn");
            Kick(playerid);
        }
    }
    if(dialogid == DIALOG_LOGIN)
    {
        if(response)
        {
            GetPlayerName(playerid, pName, 24);
            mysql_real_escape_string(inputtext, inputtext, TuberiasMySQL);
            format(str, sizeof(str), "SELECT * FROM users WHERE username='%s'", pName);
            mysql_function_query(TuberiasMySQL, str, true, "OnQueryFinish", "iis", 0,playerid, inputtext);
        }
        else
        {
            SendClientMessage(playerid, COL_RED, "KICKED: You need to login to play here");
            Kick(playerid);
        }
    {
    if(dialogid == DIALOG_SERVER)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    SendRconCommand("exit");
                    new string[128];
                    format(string, sizeof(string), "SERVER: Administrator %s has shutted down the server", GetName(playerid));
                    SendClientMessageToAll(-1, string);
                }
                case 1:
                {
                    SendRconCommand("reloadbans");
                    new string[128];
                    format(string, sizeof(string), "ADMINS: Administrator %s has reloaded the bans", GetName(playerid));
                    SendMessageToAdmins(-1, string);
                }
            }
        }
    }
    return 1;
}

And this are the lines:

pawn Код:
#definfe DIALOG_SERVER  //606

ShowPlayerDialog(playerid, DIALOG_SERVER, DIALOG_STYLE_LIST, "[0.3x] ..::DisturBed Games::.. - server 1","Server exit\n Server ReloadBans","SEND","EXIT"); //613

{  //656
if(dialogid == DIALOG_SERVER) //657

*I don`t have line 682 in my script*
If anyone can help me


Regards,
Pablo.
Reply


Messages In This Thread
/server dialog help, [SIMPLE] - by PabloDiCostanzo - 22.09.2013, 15:24
Re: /server dialog help, [SIMPLE] - by tyler12 - 22.09.2013, 15:25
Re: /server dialog help, [SIMPLE] - by EiresJason - 22.09.2013, 15:31
Respuesta: /server dialog help, [SIMPLE] - by PabloDiCostanzo - 22.09.2013, 15:35
Re: /server dialog help, [SIMPLE] - by EiresJason - 22.09.2013, 15:37
AW: /server dialog help, [SIMPLE] - by Skimmer - 22.09.2013, 16:19
Respuesta: /server dialog help, [SIMPLE] - by PabloDiCostanzo - 23.09.2013, 19:21
Re: /server dialog help, [SIMPLE] - by EiresJason - 23.09.2013, 19:32
Respuesta: /server dialog help, [SIMPLE] - by PabloDiCostanzo - 23.09.2013, 20:37
Re: /server dialog help, [SIMPLE] - by EiresJason - 23.09.2013, 20:40

Forum Jump:


Users browsing this thread: 1 Guest(s)