SA-MP Forums Archive
Got 4 pawno errors! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Got 4 pawno errors! (/showthread.php?tid=472023)



Got 4 pawno errors! - thomaswilliams - 26.10.2013

I got these errors

PHP код:

C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(5051) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(5084) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(5114) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43523) : error 017undefined symbol "string"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43523) : error 017undefined symbol "string"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43523) : error 029invalid expressionassumed zero
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43523) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

In this command

PHP код:

CMD
:******(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playeridCOLOR_GREY"You are not an authorized to use this command.");
//    if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
    
if(!strcmp(params"all"true))
    {
This is the line        format(stringsizeof(string), "{FF0000}[Admin]{FF6347} %s has checked everybody online for ****** hacks."NORPN(playerid));
        
SendClientMessageToAll(COLOR_LIGHTREDstring);
        foreach(
Playerp)
        {
            for(new 
i=0i<13i++)
            {
                   
GetPlayerWeaponData(piweapons[i][0], weapons[i][1]);
                if(
weapons[i][0] != PlayerInfo[p][pWeapon][i] && weapons[i][0] != PlayerInfo[playerb][pWeapon][i] && weapons[i][1] != 0)
                {
                    
format(stringsizeof(string), "{FF0000}[Admin Warn]{FF6347} %s is hacking a %s. (Global ****** check by %s)"NORPN(p), RWN(weapons[i][0]), NORPN(playerid));
                    
SendAdminMessage(COLOR_DARKRED1string);
                }
            }
        }
        return 
1;
    }
    if(
sscanf(params"u"playerb)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /****** [playerid/all]");
    if(!
IsPlayerLoggedIn(playerb)) return SendClientMessage(playeridCOLOR_GREY"Invalid player id.");
    
format(stringsizeof(string), "{FF0000}[Admin Warn]{FF6347} %s has checked %s for ****** hacks."NORPN(playerid), NORPN(playerb));
    
SendAdminMessage(COLOR_DARKRED1string);
    for(new 
i=0i<13i++)
    {
        
GetPlayerWeaponData(playerbiweapons[i][0], weapons[i][1]);
        if(
weapons[i][0] != PlayerInfo[playerb][pWeapon][i])
        {
             
format(stringsizeof(string), "{FF0000}[Admin Warn]{FF6347} %s is hacking a %s. (Specific ****** check by %s)"NORPN(playerb), RWN(weapons[i][0]), NORPN(playerid));
            
SendAdminMessage(COLOR_DARKRED1string);
        }
    }
    return 
1;




Re: Got 4 pawno errors! - SilentSoul - 26.10.2013

pawn Код:
CMD:******(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
//    if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
    if(!strcmp(params, "all", true))
    {
        new string[126],string2[126]; // you forgot that
        format(string, sizeof(string), "{FF0000}[Admin]{FF6347} %s has checked everybody online for ****** hacks.", NORPN(playerid));
        SendClientMessageToAll(COLOR_LIGHTRED, string);
        foreach(Player, p)
        {
            for(new i=0; i<13; i++)
            {
                   GetPlayerWeaponData(p, i, weapons[i][0], weapons[i][1]);
                if(weapons[i][0] != PlayerInfo[p][pWeapon][i] && weapons[i][0] != PlayerInfo[playerb][pWeapon][i] && weapons[i][1] != 0)
                {
                    format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s is hacking a %s. (Global ****** check by %s)", NORPN(p), RWN(weapons[i][0]), NORPN(playerid));
                    SendAdminMessage(COLOR_DARKRED, 1, string);
                }
            }
        }
        return 1;
    }
    if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /****** [playerid/all]");
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    format(string2, sizeof(string2), "{FF0000}[Admin Warn]{FF6347} %s has checked %s for ****** hacks.", NORPN(playerid), NORPN(playerb));
    SendAdminMessage(COLOR_DARKRED, 1, string);
    for(new i=0; i<13; i++)
    {
        GetPlayerWeaponData(playerb, i, weapons[i][0], weapons[i][1]);
        if(weapons[i][0] != PlayerInfo[playerb][pWeapon][i])
        {
             format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s is hacking a %s. (Specific ****** check by %s)", NORPN(playerb), RWN(weapons[i][0]), NORPN(playerid));
            SendAdminMessage(COLOR_DARKRED, 1, string);
        }
    }
    return 1;
}



Re: Got 4 pawno errors! - Konstantinos - 26.10.2013

Change:
pawn Код:
//    if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
To:
pawn Код:
//    if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
new string[128];
Can you post the code of those line they give warning 215: expression has no effect too?


Re: Got 4 pawno errors! - thomaswilliams - 26.10.2013

Getting these

PHP код:

C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(5051) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(5084) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(5114) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43523) : warning 219local variable "string" shadows a variable at a preceding level
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43524) : error 017undefined symbol "NORPN"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43528) : warning 219local variable "i" shadows a variable at a preceding level
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43530) : error 017undefined symbol "p"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43530) : warning 215expression has no effect
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43530) : error 001expected token";"but found "]"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43530) : error 029invalid expressionassumed zero
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(43530) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
5 Errors