Neewbie needs help!
#1

Hi ppl. I'm new to the pawno and I started to build my own GM.
I have encountered an error that I can't figure out
I get this error
PHP код:
 error 028invalid subscript (not an array or too many subscripts): "GetPlayerTeam"
 
warning 215expression has no effect
 
error 001expected token";"but found "]"
 
error 029invalid expressionassumed zero
 
fatal error 107too many error messages on one line 
in these lines http://pastebin.com/YEdXkbVy

Any help?
Reply
#2

paste the lines to ... like frist error what line is
Reply
#3

GetPlayerTeam uses ( ) not [ ] as it is a function, not a variable!
pawn Код:
if(GetPlayerTeam[playerid] != TEAM_COP || GetPlayerTeam[playerid] != TEAM_ARMY)
Solved:
pawn Код:
if(GetPlayerTeam(playerid) != TEAM_COP || GetPlayerTeam(playerid) != TEAM_ARMY)
Reply
#4

Thnx that works. I tried that before but than it didn't work
Reply
#5

Need help again

I get this error
PHP код:
(416) : error 004: function "IncreaseWantedLevel" is not implemented 
PHP код:
line 416 isIncreaseWantedLevel(playerid,4); 
Reply
#6

show us more code, what's near it and after also the function.
Reply
#7

http://pastebin.com/yvAnZ91D
Reply
#8

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER)
    {
        if(GetPlayerVehicleID(playerid) == PoliceCar1 || GetPlayerVehicleID(playerid) == PoliceCar2 ||
        GetPlayerVehicleID(playerid) == PoliceCar3 || GetPlayerVehicleID(playerid) == PoliceCar4 ||
        GetPlayerVehicleID(playerid) == PoliceCar5 || GetPlayerVehicleID(playerid) == PoliceCar6 ||
        GetPlayerVehicleID(playerid) == PoliceCar7 || GetPlayerVehicleID(playerid) == PoliceCar8 ||
        GetPlayerVehicleID(playerid) == PoliceCar9 || GetPlayerVehicleID(playerid) == PoliceCar10 ||
        GetPlayerVehicleID(playerid) == PoliceCar11 || GetPlayerVehicleID(playerid) == PoliceCar12 ||
        GetPlayerVehicleID(playerid) == PoliceCar13 || GetPlayerVehicleID(playerid) == PoliceCar14 ||
        GetPlayerVehicleID(playerid) == PoliceCar15)
        {
            if(GetPlayerTeam(playerid) != TEAM_COP || GetPlayerTeam(playerid) != TEAM_ARMY)
            {
                SendClientMessage(playerid,0xA0A0A0FF,"[[_Law Enforcement Vehicle Theft_]]");
                SendClientMessage(playerid,0xEB0000FF,"You have stolen a Law Enforcement Vehicle. The police has been informed, watch out ..");
                SetPlayerWantedLevel(playerid, 4);
                return 1;
            }
        }
    }
    return 1;
}
Reply
#9

Quote:
Originally Posted by Antonio144
Посмотреть сообщение
I said show us the IncreaseWantedLevel function!

@Clive, damn forgot about that, seems that since I'm a non rp scripter, makes me forget these stuff
Reply
#10

This line
pawn Код:
if(GetPlayerTeam(playerid) != TEAM_COP || GetPlayerTeam(playerid) != TEAM_ARMY)
Should be changed to:
pawn Код:
if(GetPlayerTeam(playerid) != TEAM_COP && GetPlayerTeam(playerid) != TEAM_ARMY)
Or it will bug.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)