SA-MP Forums Archive
Prolly simple mistake - 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: Prolly simple mistake (/showthread.php?tid=281978)



Prolly simple mistake - tarez - 08.09.2011

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid,-65.9408,17.0271,3.1172);
    SetPlayerHealth(playerid, 92);
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 1337);
    GivePlayerWeapon(playerid, 25, 1337);
    GivePlayerWeapon(playerid, 34, 1337);
    {
    if(PlayerInfo[playerid][pLevel] >= 5);
    GivePlayerWeapon(playerid, 27, 1337);
    return 1;
    }
}
Error

Код:
(112) : error 036: empty statement



Re: Prolly simple mistake - [Diablo] - 08.09.2011

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid,-65.9408,17.0271,3.1172);
    SetPlayerHealth(playerid, 92);
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 1337);
    GivePlayerWeapon(playerid, 25, 1337);
    GivePlayerWeapon(playerid, 34, 1337);

    if(PlayerInfo[playerid][pLevel] >= 5)
    {
        GivePlayerWeapon(playerid, 27, 1337);
    }
    return 1;
}
try this.


Re: Prolly simple mistake - tarez - 08.09.2011

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid,-65.9408,17.0271,3.1172);
    SetPlayerHealth(playerid, 92);
    GivePlayerWeapon(playerid, 1, 1);
    GivePlayerWeapon(playerid, 24, 1337);
    GivePlayerWeapon(playerid, 25, 1337);
    GivePlayerWeapon(playerid, 34, 1337);
   
    if(PlayerInfo[playerid][pLevel] >= 5);       <-------------- Line 112
    {
    GivePlayerWeapon(playerid, 27, 1337);
    }
    return 1;
}
Error

Код:
(112) : error 036: empty statement



Re: Prolly simple mistake - [Diablo] - 08.09.2011

remove the ; at the end of if(PlayerInfo[playerid][pLevel] >= 5);
my code doesn't have it :P


Re: Prolly simple mistake - tarez - 08.09.2011

LMFAO I keep making dumb mistakes. Thanks


Re: Prolly simple mistake - [Diablo] - 08.09.2011

you are welcome.