|
Line 2822 error 017: undefined symbol "IsNumeric" |
stock ReturnVehicleModelID(string[])
{
if(IsNumeric(string)) < This is Line 2822
{
new id = strval(string);
if(id >= 400 && id <= 611)
{
return id;
}
}
for(new i = 0;i < sizeof(vehName);i++)
{
if(strfind(vehName[i],string,true) != -1)
{
return i + 400;
}
}
|
Line 40443 error 047: array sizes do not match, or destination array is too small |
dcmd_unban(playerid, params[])
{
new name[120], file[126],string[100], string2[100], playerIP[256];
if(PlayerInfo[playerid][pAdmin] >= 1337 || PlayerInfo[playerid][pBanAppealer] == 1)
{
if (sscanf(params, "s", name)) return SendClientMessage(playerid, COLOR_GREY, "** [Usage]: /unban [Account Name]");
format(file,sizeof(file),"%s.ini",name);
if(!fexist(file))
{
SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: Invalid player Account");
return 1;
}
else
{
format(file, sizeof(file), "%s.ini", name);
new File: hFile = fopen(file, io_append);
if(hFile)
{
new var[32];
playerIP = dini_Get(file, "IP"); < This is line 40443
format(var, 32, "Band=0"); fwrite(hFile, var);
fclose(hFile);
}
format(string, sizeof(string), "unbanip %s", playerIP);
SendRconCommand(string);
SendRconCommand("reloadbans");
SendClientMessage(playerid, COLOR_YELLOW, "** Member unbanned");
format(string2, 256, "AdmCmd: %s has unbanned account '%s', and IP '%s'",PlayerName(playerid),name,playerIP);
ABroadCast(COLOR_LIGHTRED, string2, 1);
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "** [Error]: You are NOT an admin");
return 1;
}
}
return 0;
}
|
Line 40526 error 047: array sizes do not match, or destination array is too small |
stock ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
new invehicle[MAX_PLAYERS];
new virtualworld = GetPlayerVirtualWorld(playerid);
new interior = GetPlayerInterior(playerid);
new vehicleid = GetPlayerVehicleID(playerid);
new ivehicleid;
if(vehicleid) < This is line 40526
{
GetVehiclePos(vehicleid,oldposx,oldposy,oldposz);
}
else
{
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
vehicleid = GetPlayerVehicleID(playerid);
}
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(!BigEar[i])
{
if(GetPlayerVirtualWorld(i) == virtualworld)
{
if((GetPlayerInterior(i) == interior))
{
if(vehicleid)
{
if(IsPlayerInVehicle(i,vehicleid))
{
invehicle[i] = 1;
}
}
if(!invehicle[i])
{
if(IsPlayerInAnyVehicle(i))
{
ivehicleid = GetPlayerVehicleID(i);
GetVehiclePos(ivehicleid,posx,posy,posz);
} else {
GetPlayerPos(i,posx,posy,posz);
}
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
} else {
SendClientMessage(i, col1, string);
}
}
}
}
return 1;
}
stock isNumeric(const string[]) {
new length=strlen(string);
if (length==0) return false;
for (new i = 0; i < length; i++) {
if (
(string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+')
|| (string[i]=='-' && i!=0)
|| (string[i]=='+' && i!=0)
) return false;
}
if (length==1 && (string[0]=='-' || string[0]=='+')) return false;
return true;
}