25.07.2014, 17:41
Hello,
I was compiling my filescripts, and I got these errors :
Here are the lines of the errors :
Line #270 - #280
Lines #285 - #300 :
Lines #2150 - #2160 :
Lines #2199 - #2210 :
Lines #2250 - #2260 :
Lines #2400 - #2410 :
Lines #2435 - #2450
Lines #2470 - #2480 :
Lines #2500 - #2510 :
Lines #2530 - #2540 :
Lines #2590 - #2600 :
Lines #2780 - #2790 :
Lines #3755 - #3566 :
Lines #3770 - #3780 :
Lines #3850 - #3860 :
Lines #4040 - #4050 :
Lines #4070 - #4080 :
Who will help me at least with one thing and it works = +REP
I was compiling my filescripts, and I got these errors :
Код:
C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(275) : error 021: symbol already defined: "strtok" C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(290) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2151) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2202) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2251) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2402) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2404) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2438) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2440) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2474) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2504) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2508) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2539) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2592) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(2782) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(3760) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(3777) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(3852) : error 047: array sizes do not match, or destination array is too small C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(4041) : warning 219: local variable "Time" shadows a variable at a preceding level C:\Users\User\Desktop\DC\filterscripts\arjanzadmin.pwn(4076) : warning 219: local variable "Time" shadows a variable at a preceding level Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 18 Errors.
Line #270 - #280
pawn Код:
end:
return playername;
}
strtok1(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
pawn Код:
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}
pawn Код:
new tmp[128];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ORANGE, VhFix_PlNOV);
RepairVehicle(GetPlayerVehicleID(playerid));
SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
new Message1[144] = "[DC]Admin -|{FFFFFF} Admin{CECECE} %s {8000FF}has fixed his vehicle |-";
format(Message1, sizeof(Message1), Message1, GetName(playerid));
pawn Код:
if(PlayerVal[playerid][VLvlAdmin] >= 4)
{
new tmp[128]; new PID;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, AGoto_Usage);
PID = strval(tmp); format(AGoto_IDNOC, sizeof(AGoto_IDNOC), AGoto_IDNOC, PID);
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_ORANGE, AGoto_IDNOC);
new Float:X, Float:Y, Float:Z, VW, intr;
format(AGoto_Messg, sizeof(AGoto_Messg), AGoto_Messg, GetName(playerid), GetName(PID,1));
pawn Код:
new tmp[128]; new PID;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, GHere_Usage);
PID = strval(tmp); format(GHere_IDNOC, sizeof(GHere_IDNOC), GHere_IDNOC, PID);
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, COLOR_ORANGE, GHere_IDNOC);
if(PlayerVal[PID][VDuty] == 1)
{
new Dutty_Mode[144] = "[Error] -|{FFFFFF} The player with id -|{33CCFF} %i {FFFFFF}|- is {FF0000}using Duty Mode |-";
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_RED, CCLOR_NoCar);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, CCLOR_Usage);
COLOR1 = strval(tmp); tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, CCLOR_Usage);
COLOR2 = strval(tmp);
if(COLOR1 < 0 || COLOR1 > 255) return SendClientMessage(playerid, COLOR_ORANGE, CCLOR_Usage);
if(COLOR2 < 0 || COLOR2 > 255) return SendClientMessage(playerid, COLOR_ORANGE, CCLOR_Usage);
pawn Код:
if(PlayerVal[playerid][VLvlAdmin] < 2) return SendClientMessage(playerid, COLOR_ORANGE, STime_NOAdm);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, STime_Usage);
hour = strval(tmp); tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, STime_Usage);
minute = strval(tmp);
if(hour < 0 || hour > 23) return SendClientMessage(playerid, COLOR_ORANGE, STime_NHour);
if(minute < 0 || minute > 59) return SendClientMessage(playerid, COLOR_ORANGE, STime_NMint);
CallRemoteFunction("SetTime","i/i", hour, minute);
new HourS[4], MinuteS[4];
pawn Код:
new tmp[128]; new WeatherID;
if(PlayerVal[playerid][VLvlAdmin] < 1) return SendClientMessage(playerid, COLOR_ORANGE, SWeat_NOAdm);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, SWeat_Usage);
WeatherID = strval(tmp);
if(WeatherID < 0 || WeatherID > 700) return SendClientMessage(playerid, COLOR_ORANGE, SWeat_NWeat);
SetWeather(WeatherID);
pawn Код:
new tmp[128]; new WeatherID, PPlayerID;
if(PlayerVal[playerid][VLvlAdmin] < 1) return SendClientMessage(playerid, COLOR_ORANGE, SWeat_NOAdm);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, SWeat_Usage);
PPlayerID = strval(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, SWeat_Usage);
WeatherID = strval(tmp);
pawn Код:
new Freez_NOAdm[128] = "[DC|CMD] -|{FFFFFF} Your admin level must be 2 or higher {F6F600}|-";
new Freez_IDNOC[128] = "[DC|CMD] -|{FFFFFF} The player with id -|{33CCFF} %i {FFFFFF}|- is {F60000}not connected {FF9900}|-";
new Freez_plyer[144] = "[DC]Admin -|{FFFFFF} Admin{CECECE} %s{FFFFFF} has freezed {5CB5F5}%s {53FFFF}|-";
new tmp[128]; new PTFreez;
if(PlayerVal[playerid][VLvlAdmin] < 2) return SendClientMessage(playerid, COLOR_ORANGE, Freez_NOAdm);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, Freez_Usage);
pawn Код:
if(PlayerVal[playerid][VLvlAdmin] < 2) return SendClientMessage(playerid, COLOR_ORANGE, Freez_NOAdm);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, Freez_Usage);
PTFreez = strval(tmp);
format(Freez_IDNOC, sizeof(Freez_IDNOC), Freez_IDNOC, PTFreez);
if(!IsPlayerConnected(PTFreez)) return SendClientMessage(playerid, COLOR_ORANGE, Freez_IDNOC);
if(!PlayerVal[PTFreez][VFreeze])
{
pawn Код:
if(PlayerVal[playerid][VLvlAdmin] < 2) return SendClientMessage(playerid, COLOR_ORANGE, PSlap_NOAdm);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_ORANGE, PSlap_Usage);
PTSlap = strval(tmp);
format(PSlap_IDNOC, sizeof(PSlap_IDNOC), PSlap_IDNOC, PTSlap);
format(PSlap_IDFRZ, sizeof(PSlap_IDFRZ), PSlap_IDFRZ, GetName(playerid, 1));
format(PSlap_IDSPD, sizeof(PSlap_IDSPD), PSlap_IDSPD, GetName(playerid, 1));
if(!IsPlayerConnected(PTSlap)) return SendClientMessage(playerid, COLOR_ORANGE, PSlap_IDNOC);
pawn Код:
if (strcmp(cmd, "/int", true) == 0)
{
new tmp[24]; tmp = strtok(cmdtext, idx);
new INT = strval(tmp);
SetPlayerInterior(playerid, INT);
return 1;
}
pawn Код:
{
new SpawnFile[128] = "/[DC]Admin/points.spn";
new Entry[256] = "%s : %f, %f, %f, %f\n";
new Float:X, Float:Y, Float:Z;
new Float:P;
new Strg[50]; Strg = strtok(cmdtext, idx);
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, P);
pawn Код:
new Bvar;
var = strtok(cmdtext, idx);
if(!strlen(var)) return SendClientMessage(playerid, 0xFF9900FF,USAGE);
Bvar = strval(var);
if(Bvar != 0 && Bvar != 1) return SendClientMessage(playerid, 0xFF9900FF,USAGE);
if(Bvar == 0)
{
pawn Код:
new Date[32] = "%02d/%02d/%02d", Day , Mounth, Year ;
new Time[32] = "%02d:%02d:%02d", Hour, Minute, Second ;
getdate(Year, Mounth, Day),
gettime(Hour, Minute, Second);
format(Date, sizeof(Date), Date, Day , Mounth, Year );
format(Time, sizeof(Time), Time, Hour, Minute, Second );
new Entry[1024] = "From: %s | [%s][%s] | %s\n";
pawn Код:
new tmp[512]; tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF9900FF, Usage);
strdel(cmdtext, 0, 9);
new Date[32] = "%02d/%02d/%02d", Day , Mounth, Year ;
new Time[32] = "%02d:%02d:%02d", Hour, Minute, Second;
getdate(Year, Mounth, Day),
gettime(Hour, Minute, Second);