error ban and kick
#1

Hello, please help me I added admin command kick and ban but me error

error
Quote:

C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(1 : error 017: undefined symbol "numargs"
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(1 : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(1 : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(19) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(20) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(55) : error 017: undefined symbol "delim"
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : error 017: undefined symbol "setarg"
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : warning 215: expression has no effect
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(56) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Errors.

kick or ban code

dcmd_ban(playerid, params[])
{
new name[MAX_PLAYER_NAME], idName[MAX_PLAYER_NAME];
new pFile[128], idFile[128], bFile[128];
new priez[256], gd[128];
new id, reason[128];
new Year, Month, Day;
getdate(Year, Month, Day);
sscanf(params, "dz", id, reason);
GetPlayerName(playerid, name, sizeof(name));
format(pFile, sizeof(pFile), "users/%s.ini", name);
GetPlayerName(id, idName, sizeof(idName));
format(idFile, sizeof(idFile), "users/%s.ini", idName);
format(bFile, sizeof(bFile), "users/bans/%s.ini", idName);
pInfo[playerid][AdminLvl] = dini_Int(pFile, "AdminLvl");

if(pInfo[playerid][Logged] == 1)
{
if(pInfo[playerid][AdminLvl] >= 3)
{
if(!sscanf(params, "dz", id, reason))
{
if(!IsPlayerConnected(id))
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Sis ID nerastas !");
}
else
{
format(gd, sizeof(gd), "%d / %d / %d", Year, Month, Day);
dini_Create(bFile);
dini_Set(bFile, "Reason", reason);
dini_Set(bFile, "Date", gd);
format(priez, sizeof(priez), "[SERVER]: Tave uzblokavo: %s ! Priezastis: %s", name, reason);
SendClientMessage(id, COLOR_VIOLET, priez);
BanEx(id, reason);
SendClientMessage(playerid, COLOR_VIOLET, "[SERVER]: Zaidejas uzblokuotas !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Naudok: /ban [Playerid] [Priezastis] !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Tavo admino lygis per mazas !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Tu neprisijunges !");
}
return 1;
}

dcmd_kick(playerid, params[])
{
new name[MAX_PLAYER_NAME], idName[MAX_PLAYER_NAME], pFile[128], idFile[128], priez[256];
new id, info[128];
GetPlayerName(playerid, name, sizeof(name));
format(pFile, sizeof(pFile), "users/%s.ini", name);
GetPlayerName(id, idName, sizeof(idName));
format(idFile, sizeof(idFile), "users/%s.ini", idName);
pInfo[playerid][AdminLvl] = dini_Int(pFile, "AdminLvl");

if(pInfo[playerid][Logged] == 1)
{
if(pInfo[playerid][AdminLvl] >= 2)
{
if(!sscanf(params, "dz", id, info))
{
if(!IsPlayerConnected(id))
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Sis ID nerastas !");
}
else
{
pInfo[id][Kicked] = dini_Int(idFile, "Kicked");
dini_IntSet(idFile, "Kicked", pInfo[id][Kicked]+1);
format(priez, sizeof(priez), "[SERVER]: Tave ismete is servo ! Priezastis: %s", info);
SendClientMessage(id, COLOR_VIOLET, priez);
Kick(id);
SendClientMessage(playerid, COLOR_VIOLET, "[SERVER]: Zaidejas ismestas !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Naudok: /kick [Playerid] [Priezastis] !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Tavo admino lygis per mazas !");
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "[SERVER]: Tu neprisijunges !");
}
return 1;
}
Reply
#2


Please help me
Reply
#3

you pasted the code with errors like
Код:
C:\Documents and Settings\Administrator\Desktop\0.3 SF-Life\pawno\include\sscanf_dcmd.inc(55) : error 017: undefined symbol "delim"
but the code you pasted doesn't even have "delim" in it, please paste the right parts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)