weird problems...
#1

errors :
Quote:

C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(348 : error 079: inconsistent return types (array & non-array)
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3493) : error 079: inconsistent return types (array & non-array)
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3517) : error 029: invalid expression, assumed zero
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3517) : error 004: function "robbingdrugscountdown" is not implemented
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3574) : error 029: invalid expression, assumed zero
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3574) : error 004: function "twofoursevenmoveplayer" is not implemented
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3657) : error 029: invalid expression, assumed zero
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3657) : warning 221: label name "Float" shadows tag name
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3657) : error 004: function "GetDistanceBetweenPlayers" is not implemented
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3661) : error 079: inconsistent return types (array & non-array)
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(3665) : error 079: inconsistent return types (array & non-array)
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(366 : warning 225: unreachable code
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(366 : error 017: undefined symbol "IsNumeric"
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(366 : error 029: invalid expression, assumed zero
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(366 : error 017: undefined symbol "string"
C:\Users\Fam Selten\Documents\Peter\san andreas\lscnrrpg\andere server\tom server\gamemodes\tom.pwn(366 : fatal error 107: too many error messages on one line

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


14 Errors.

pawn code error 1:
pawn Код:
IRCCMD:ban(botid,  channel[], user[],  params[]) // supports banning by partial nickname
{
    if (IRC_IsOp(gGroupID,channel,user)) {
    new strmessage[150];
    new strMsg[128],striMsg[128],pid,reason[128],strname[128];
    pid = strval(params);
        //if(isnull(reason)) return false; //IRC_Notice(gGroupID,user,"You have not put in a reason");
        if (IsPlayerConnected(pid))
        {
            new space = (strfind(params, strname));
            if (space != -1)
            {
                format(strmessage, sizeof(strmessage), "**(ADMIN BAN)** \2;%s(%d)\2;", params,pid);
                SendClientMessageToAll(0xFF7F50AA, strmessage);
                IRC_GroupSay(gGroupID,AD_CHANNEL,strmessage);
                if(udb_Exists(PlayerName(pid)) && PLAYERLIST_authed[pid]) {
                dUserSetINT(PlayerName(pid)).("nameban",1);
                format(strMsg, sizeof(strMsg),"By IRC Admin %s", user);
                IRC_GroupSay(gGroupID, AD_CHANNEL, strMsg);
                format(strMsg, sizeof(strMsg),"With Reason: %s", reason);
                IRC_GroupSay(gGroupID, AD_CHANNEL, striMsg);
                /*new file[128];
                format(file,128,"Ban:%s",params);
                if (!fexist(file))
                {
                    file = fopen(file, io_write);
                }
                else
                {
                    file = fopen(file, io_append);
                }
                if (file)
                {
                    fwrite(file, strMsg);
                    fwrite(file, striMsg);
                    fclose(file);
                }*/

               
                Banning[pid] = 1;
                SetTimer("BanPlayer",700,0);
                return true;
            }
        }
        format(strmessage, sizeof(strmessage), "2*** \2;%s\2; is not found on the server.", params);
        IRC_GroupSay(gGroupID,AD_CHANNEL,strmessage);
        return true; // error line
    }
}
error 2:
pawn Код:
public robbingdrugscountdown()
{ // error line (number 2 +3)
    for(new i=0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(robbingdrugs[i] >= 2)
            {
                robbingdrugs[i] --;
                new pstring[100];
                format(pstring, sizeof(pstring), "~y~ROBBERY IN PROGRESS~n~~r~STAY IN THE CHECKPOINT");
                GameTextForPlayer(i, pstring, 2000,3);
            }
            if(robbingdrugs[i] == 1)
            {
                new drugrobrand = random(3000);
                robbingdrugs[i] =0;
                new pname[30];
                new pstring[100];
                GetPlayerName(i,pname,30);
                format(pstring, sizeof(pstring), "%s(%d) Has robbed %d grams of drugs from the Drug House",pname,i,drugrobrand);
                SendClientMessageToAll(0x00C7FFAA,pstring);
                IRC_GroupSay(gGroupID, IRC_CHANNEL,pstring);
                format(pstring, sizeof(pstring), "~b~DRUG HOUSE~n~~y~ROBBERY COMPLETE~n~~w~%d GRAMS STOLEN!",drugrobrand);
                GameTextForPlayer(i, pstring, 5000,3);
                oscore = GetPlayerScore(i);
                SetPlayerScore(i, oscore +1);
                DrugsRobbed =1;
                drugs -=drugrobrand;
                PlayerDrugs[i] += drugrobrand;
                format(pstring, sizeof(pstring), "Drug House Robbery Complete. You robbed a total of %d grams of drugs",drugrobrand);
                SendClientMessage(i,COLOR_RED, pstring);
                if(robberrank[i] <=39) {
                SendClientMessage(i,COLOR_WHITE,"Your robbing skill level has been increased. Type /robskill for more info");
                robberrank[i] +=1;
                }
                printf("%s(%d) has robbed %s grams of drugs in a Drug House robbery",pname,i,drugrobrand);
                for(new d=0;d<MAX_PLAYERS;d++)
    {
    if(DrugHouseOwner[d] == 1337) {
        new string1[256];
        new string2[256];
        new string3[256];
        format(string1, sizeof(string1), "%s(%d) has robbed %d grams of drugs from your drug house", pname,i,drugrobrand);
        format(string2, sizeof(string2), "You can order more drugs using /orderdrugs");
        format(string3, sizeof(string3), "Type /selldrughouse (id) to sell the drug house");
        SendClientMessage(d, COLOR_ROYALBLUE, string1);
        SendClientMessage(d, COLOR_ROYALBLUE, string2);
        SendClientMessage(d, COLOR_DODGERBLUE, string3);
        }
        }
        }
        }
    }
}
error 4+5:
pawn Код:
public twofoursevenmoveplayer()
{ // error line
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
    if(IsPlayerConnected(i) && IsSpawned[i] == 1 && GetPlayerInterior(i) == 0 && Jailed[i] == 0)
    {
    if(TimeToMoveTwoFourSeven[i] >=1 && TimeToMoveTwoFourSeven[i] <=3)
    {
    TimeToMoveTwoFourSeven[i] --;
    }
    if(TimeToMoveTwoFourSeven[i] == 0)
    {
    if(LeftTwoFourSeven[i] == 1)
    {
        SetPlayerVirtualWorld(i,0);
        SetPlayerInterior(i,0);
        SetPlayerPos(i,1592.2305,2214.1846,10.8203);
        SetPlayerFacingAngle(i,187.0764);
        SetCameraBehindPlayer(i);
        LeftTwoFourSeven[i] =999;
        TimeToMoveTwoFourSeven[i] =999;
        TogglePlayerControllable(i, 1);
    }
    if(LeftTwoFourSeven[i] == 2)
    {
        SetPlayerVirtualWorld(i,0);
        SetPlayerInterior(i,0);
        SetPlayerPos(i,2191.6472,2476.4624,10.8203);
        SetPlayerFacingAngle(i,272.7751);
        SetCameraBehindPlayer(i);
        LeftTwoFourSeven[i] =999;
        TimeToMoveTwoFourSeven[i] =999;
        TogglePlayerControllable(i, 1);
    }
    if(LeftTwoFourSeven[i] == 3)
    {
        SetPlayerVirtualWorld(i,0);
        SetPlayerInterior(i,0);
        SetPlayerPos(i,2630.5876,1124.3673,10.8203);
        SetPlayerFacingAngle(i,177.8683);
        SetCameraBehindPlayer(i);
        LeftTwoFourSeven[i] =999;
        TimeToMoveTwoFourSeven[i] =999;
        TogglePlayerControllable(i, 1);
    }
    if(LeftTwoFourSeven[i] == 4)
    {
        SetPlayerVirtualWorld(i,0);
        SetPlayerInterior(i,0);
        SetPlayerPos(i,2108.0222,901.5873,10.8203);
        SetPlayerFacingAngle(i,2.9187);
        SetCameraBehindPlayer(i);
        LeftTwoFourSeven[i] =999;
        TimeToMoveTwoFourSeven[i] =999;
        TogglePlayerControllable(i, 1);
    }
    if(LeftTwoFourSeven[i] == 5)
    {
        SetPlayerVirtualWorld(i,0);
        SetPlayerInterior(i,0);
        SetPlayerPos(i,664.9492,1726.6813,6.9922);
        SetPlayerFacingAngle(i,42.5792);
        SetCameraBehindPlayer(i);
        LeftTwoFourSeven[i] =999;
        TimeToMoveTwoFourSeven[i] =999;
        TogglePlayerControllable(i, 1);
    }
    if(LeftTwoFourSeven[i] == 6)
    {
        SetPlayerVirtualWorld(i,0);
        SetPlayerInterior(i,0);
        SetPlayerPos(i,2142.6326,2739.4309,10.8203);
        SetPlayerFacingAngle(i,5.6754);
        SetCameraBehindPlayer(i);
        LeftTwoFourSeven[i] =999;
        TimeToMoveTwoFourSeven[i] =999;
        TogglePlayerControllable(i, 1);
    }
  }
}
}
}
error 6+7+8:
pawn Код:
public Float:GetDistanceBetweenPlayers(p1,p2){
    new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2; // error line
    if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
        return -1.00;
    } // error line
    GetPlayerPos(p1,x1,y1,z1);
    GetPlayerPos(p2,x2,y2,z2);
    return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs( floatsub(z2,z1)),2));
}
rest:
pawn Код:
IsNumeric(const string[])
{ // error line
    for (new i = 0, j = strlen(string); i < j; i++) {
        if (string[i] > '9' || string[i] < '0') {
            return 0;
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)