[HELP] Filescript Compiling errors [+REP]
#1

Hello,

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.
Here are the lines of the errors :
Line #270 - #280
pawn Код:
end:
    return playername;
}

strtok1(const string[], &index)
{
    new length = strlen(string);
    while ((index < length) && (string[index] <= ' '))
    {
        index++;
    }
Lines #285 - #300 :
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;
}
Lines #2150 - #2160 :
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));
Lines #2199 - #2210 :
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));
Lines #2250 - #2260 :
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 |-";
Lines #2400 - #2410 :
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);
Lines #2435 - #2450
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];
Lines #2470 - #2480 :
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);
Lines #2500 - #2510 :
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);
Lines #2530 - #2540 :
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);
Lines #2590 - #2600 :
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])
        {
Lines #2780 - #2790 :
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);
Lines #3755 - #3566 :
pawn Код:
if (strcmp(cmd, "/int", true) == 0)
    {
        new tmp[24]; tmp = strtok(cmdtext, idx);
        new INT = strval(tmp);
       
        SetPlayerInterior(playerid, INT);
   
        return 1;
    }
Lines #3770 - #3780 :
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);
Lines #3850 - #3860 :
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)
            {
Lines #4040 - #4050 :
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";
Lines #4070 - #4080 :
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);
Who will help me at least with one thing and it works = +REP
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)