i need help
#1

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(Drugs[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, -3000);
    SetPlayerWeather(playerid, -66);
    if(GetPlayerMoney[playerid] == <3000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Error:You don't have enough money");
    {
    return 1;
}
pawn Код:
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(567) : error 028: invalid subscript (not an array or too many subscripts): "GetPlayerMoney"
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(567) : warning 215: expression has no effect
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(567) : error 001: expected token: ";", but found "]"
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(567) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(567) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
i have defined/new and other stuff Done.. can someone tell me the problem?
Reply
#2

It should be:
pawn Код:
GetPlayerMoney ( playerid )
https://sampwiki.blast.hk/wiki/GetPlayerMoney
Reply
#3

don't you think that you have 3 open braces with 2 closed
Reply
#4

still the same Errors
Reply
#5

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(Drugs[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, -3000);
    SetPlayerWeather(playerid, -66);
    if(GetPlayerMoney[playerid] == <3000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Error:You don't have enough money");
    { //<<<<<<<<<<<<=================================== correct this one hove you done ?
    return 1;
}
Reply
#6

maybe you mean something like:
Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(Drugs[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    GivePlayerMoney(playerid, -3000);
    SetPlayerWeather(playerid, -66);
    if(GetPlayerMoney[playerid] < 3000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Error:You don't have enough money");
    }
    return 1;
}
Reply
#7

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(Drugs[playerid] == 1)
    {
           if(GetPlayerMoney(playerid) == <3000) return SendClientMessage(playerid, COLOR_BRIGHTRED, "Error:You don't have enough money");
           DisablePlayerCheckpoint(playerid);
           GivePlayerMoney(playerid, -3000);
           SetPlayerWeather(playerid, -66);
    }
    return 1;
}
Reply
#8

Still Same errors.. Pleaze someone Help lol
pawn Код:
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(564) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(564) : warning 215: expression has no effect
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(564) : error 001: expected token: ";", but found ")"
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(564) : error 029: invalid expression, assumed zero
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(564) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#9

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if ( Drugs[ playerid ] == 1 )
    {
        if ( GetPlayerMoney ( playerid ) < 3000 ) return SendClientMessage( playerid, COLOR_BRIGHTRED, "Error:You don't have enough money" );
        DisablePlayerCheckpoint( playerid );
        GivePlayerMoney( playerid, -3000 );
        SetPlayerWeather( playerid, -66 );
    }
    return 1;
}
Reply
#10

No errors now but when i go inside Cp nothing happens..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)