WOW MESSED MY SCRIPT UP PLEASE HELP
#1

Код:
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(104) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(109) : warning 217: loose indentation
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(111) : warning 217: loose indentation
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(130) : warning 217: loose indentation
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(135) : error 017: undefined symbol "Logged"
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(135) : warning 215: expression has no effect
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(135) : error 001: expected token: ";", but found "]"
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(135) : error 029: invalid expression, assumed zero
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(135) : fatal error 107: too many error messages on one line

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


5 Errors.
Line 135 : Logged[ playerid ] = 0;


HELP PLEASE
Reply
#2

pawn Код:
//at the top of script after the #includes

new Logged[MAX_PLAYERS];
Reply
#3

Quote:
Originally Posted by Reklez
Посмотреть сообщение
pawn Код:
//at the top of script after the #includes

new Logged[MAX_PLAYERS];
THANK YOU!


But now i have one more error

Код:
(107) : error 001: expected token: ";", but found "public"
Line 107 : public OnPlayerUpdate(playerid)
Reply
#4

Show me the full code of OnPlayerUpdate
Reply
#5

Quote:
Originally Posted by Reklez
Посмотреть сообщение
Show me the full code of OnPlayerUpdate
Please i just want it to work its mine and my friends script, we never had a problem with OnPlayerUpdate


Код:
public OnPlayerUpdate(playerid)
{
            new weaponid = GetPlayerWeapon(playerid);//This will cause the "weaponid not defined" Error
                new Nam[MAX_PLAYER_NAME];
                new str[128];
            if(weaponid == 16) // The weapon ID
            if(weaponid == 16) // The weapon ID
            if(weaponid == 10) // The weapon ID
            if(weaponid == 11) // The weapon ID
            if(weaponid == 12) // The weapon ID
            if(weaponid == 13) // The weapon ID
            if(weaponid == 17) // The weapon ID
            if(weaponid == 18) // The weapon ID
            if(weaponid == 35) // The weapon ID
            if(weaponid == 36) // The weapon ID
            if(weaponid == 37) // The weapon ID
            if(weaponid == 38) // The weapon ID
            if(weaponid == 39) // The weapon ID
            {
            GetPlayerName(playerid,Nam,sizeof(Nam));
            format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning A Hacked Weapon!",Nam);
            SendClientMessageToAll(0xFF0000FF,str);
            BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
            }
                        return 1;
}
Reply
#6

I don't see the problem i replace the OnPlayerUpdate with your OnPlayerUpdate on my test script.
Otherwise this is the fix version:

pawn Код:
public OnPlayerUpdate(playerid)
{
    new weaponid = GetPlayerWeapon(playerid);
    new Nam[MAX_PLAYER_NAME];
    new str[128];
    if(weaponid == 16) // The weapon ID
    if(weaponid == 16) // The weapon ID
    if(weaponid == 10) // The weapon ID
    if(weaponid == 11) // The weapon ID
    if(weaponid == 12) // The weapon ID
    if(weaponid == 13) // The weapon ID
    if(weaponid == 17) // The weapon ID
    if(weaponid == 18) // The weapon ID
    if(weaponid == 35) // The weapon ID
    if(weaponid == 36) // The weapon ID
    if(weaponid == 37) // The weapon ID
    if(weaponid == 38) // The weapon ID
    if(weaponid == 39) // The weapon ID
    {
        GetPlayerName(playerid,Nam,sizeof(Nam));
        format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning A Hacked Weapon!",Nam);
        SendClientMessageToAll(0xFF0000FF,str);
        BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
    }
    return 1;
}
Reply
#7

Quote:
Originally Posted by Reklez
Посмотреть сообщение
I don't see the problem i replace the OnPlayerUpdate with your OnPlayerUpdate on my test script.
Otherwise this is the fix version:

pawn Код:
public OnPlayerUpdate(playerid)
{
    new weaponid = GetPlayerWeapon(playerid);
    new Nam[MAX_PLAYER_NAME];
    new str[128];
    if(weaponid == 16) // The weapon ID
    if(weaponid == 16) // The weapon ID
    if(weaponid == 10) // The weapon ID
    if(weaponid == 11) // The weapon ID
    if(weaponid == 12) // The weapon ID
    if(weaponid == 13) // The weapon ID
    if(weaponid == 17) // The weapon ID
    if(weaponid == 18) // The weapon ID
    if(weaponid == 35) // The weapon ID
    if(weaponid == 36) // The weapon ID
    if(weaponid == 37) // The weapon ID
    if(weaponid == 38) // The weapon ID
    if(weaponid == 39) // The weapon ID
    {
        GetPlayerName(playerid,Nam,sizeof(Nam));
        format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning A Hacked Weapon!",Nam);
        SendClientMessageToAll(0xFF0000FF,str);
        BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
    }
    return 1;
}
Код:
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(107) : error 001: expected token: ";", but found "public"
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(435) : warning 217: loose indentation
C:\Users\Jamie\Dropbox\GTA PROJECT\Basic_RP_Script_Scratch_FIX\Basic RP Script Scratch FIX\gamemodes\U1.pwn(815) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#8

Lmao, Reklez. Its Not on Player Update.

Its Wants to Find a ; But it Found Public, Obvisley its Above OnPlayerUpdate.
Reply
#9

what's with the empty statements...

pawn Код:
public OnPlayerUpdate(playerid)
{
    new weaponid = GetPlayerWeapon(playerid), bool:found;
    switch(weaponid)
    {
        case 10..13: found = true;
        case 16..18: found = true;
        case 35..39: found = true;
        default: found = false;
    }
    if(found)
    {
        new Nam[MAX_PLAYER_NAME], str[128];
        GetPlayerName(playerid,Nam,sizeof(Nam));
        format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning A Hacked Weapon!",Nam);
        SendClientMessageToAll(0xFF0000FF,str);
        BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)