24.03.2009, 15:57
Hi,
For every user in my game in the it user file it has a line saying' Council_Staff 0/1 with 0 bieng not staff and 1 being staff, I've also made a command which is called /makeadmin and it changes the user who is using that command from 'Council_Staff 0' to 'Council_Staff 1'. That command works fine but I've now created a command for kick and it has to check in the file for the Council_Staff 1 otherwise it wont let them do it. And i don't have a clue how i can make it check their file for that line and let them use the command otherwise show them my error message.
Below is my command & I'd be grateful if anyone could help me with this code.
Then i get the following messages
Line 4620 is:
Any ideas on how i can sort this command out?
Ashley
For every user in my game in the it user file it has a line saying' Council_Staff 0/1 with 0 bieng not staff and 1 being staff, I've also made a command which is called /makeadmin and it changes the user who is using that command from 'Council_Staff 0' to 'Council_Staff 1'. That command works fine but I've now created a command for kick and it has to check in the file for the Council_Staff 1 otherwise it wont let them do it. And i don't have a clue how i can make it check their file for that line and let them use the command otherwise show them my error message.
Below is my command & I'd be grateful if anyone could help me with this code.
pawn Код:
dcmd_kick(playerid, params[])
{
if(Council_Staff[playerid] ==1)
{
new id,reason[256];
if (!sscanf(params, "ds", id,reason)) SendClientMessage(playerid, 0xFF0000FF, "[BMDC] Usage: /kick [ID] [REASON]");
else if (IsPlayerConnected(playerid))
{
new tmp[256];
format(tmp,256,"[KICK] %s(%d) got kicked from the server: %s",PlayerName(id),id,reason);
SendClientMessageToAll(COLOR_ORANGE,tmp);
Kick(id);
dini_IntSet("banlog",tmp,1);
print(tmp);
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "[BMDC] Invalid ID");
}
}
return 1;
}
Код:
C:\Users\Ashley\Desktop\samp02Xserver.win32[1]\gamemodes\RP.pwn(4620) : error 017: undefined symbol "Council_Staff" C:\Users\Ashley\Desktop\samp02Xserver.win32[1]\gamemodes\RP.pwn(4620) : warning 215: expression has no effect C:\Users\Ashley\Desktop\samp02Xserver.win32[1]\gamemodes\RP.pwn(4620) : error 001: expected token: ";", but found "]" C:\Users\Ashley\Desktop\samp02Xserver.win32[1]\gamemodes\RP.pwn(4620) : error 029: invalid expression, assumed zero C:\Users\Ashley\Desktop\samp02Xserver.win32[1]\gamemodes\RP.pwn(4620) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors.
pawn Код:
if(Council_Staff[playerid] ==1)
Any ideas on how i can sort this command out?
Ashley