22.09.2013, 15:24
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
This is my script
And this are the lines:
If anyone can help me
Regards,
Pablo.
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)
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*
Regards,
Pablo.