SA-MP Forums Archive
Help me system is not running - 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: Help me system is not running (/showthread.php?tid=656634)



Help me system is not running - linhpro200294 - 20.07.2018

Help me handle this system for it to run, if anyone knows how to do it please help me!

Error:
Quote:

./includes/ngg.pwn(133013) : error 010: invalid function or declaration
./includes/ngg.pwn(133014) : error 010: invalid function or declaration
./includes/ngg.pwn(133016) : error 010: invalid function or declaration
./includes/ngg.pwn(13301 : error 010: invalid function or declaration
./includes/ngg.pwn(133020) : error 010: invalid function or declaration
./includes/ngg.pwn(133021) : error 010: invalid function or declaration
./includes/ngg.pwn(133022) : error 010: invalid function or declaration
./includes/ngg.pwn(133023) : error 010: invalid function or declaration
./includes/ngg.pwn(133024) : error 010: invalid function or declaration
./includes/ngg.pwn(133025) : error 010: invalid function or declaration
./includes/ngg.pwn(133026) : error 010: invalid function or declaration
./includes/ngg.pwn(133027) : error 010: invalid function or declaration
./includes/ngg.pwn(13302 : error 010: invalid function or declaration
./includes/ngg.pwn(133029) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


14 Errors.

Code error:
Quote:

ServerHeartbeatTwo[1000]() {
foreach(new i: Player)
{
if(IsPlayerInAnyVehicle(i))
{
if(GetPlayerState(i) == PLAYER_STATE_PASSENGER)
{
if(GetPlayerState(i) == PLAYER_STATE_DRIVER) SetPlayerArmedWeapon(i, 0);
else if(PlayerInfo[i][pGuns][0] == 0 && GetPlayerWeapon(i) == 0) SetPlayerArmedWeapon(i, 0);
else if(PlayerInfo[i][pGuns][2] == 22 && GetPlayerWeapon(i) == 22) SetPlayerArmedWeapon(i, 22);
else if(PlayerInfo[i][pGuns][2] == 24 && GetPlayerWeapon(i) == 24) SetPlayerArmedWeapon(i, 24);
else if(PlayerInfo[i][pGuns][3] == 25 && GetPlayerWeapon(i) == 25) SetPlayerArmedWeapon(i, 25);
else if(PlayerInfo[i][pGuns][4] == 28 && GetPlayerWeapon(i) == 2 SetPlayerArmedWeapon(i, 2;
else if(PlayerInfo[i][pGuns][4] == 29 && GetPlayerWeapon(i) == 29) SetPlayerArmedWeapon(i, 29);
else if(PlayerInfo[i][pGuns][5] == 30 && GetPlayerWeapon(i) == 30) SetPlayerArmedWeapon(i, 30);
else if(PlayerInfo[i][pGuns][5] == 31 && GetPlayerWeapon(i) == 31) SetPlayerArmedWeapon(i, 31);
else if(PlayerInfo[i][pGuns][4] == 32 && GetPlayerWeapon(i) == 32) SetPlayerArmedWeapon(i, 32);
}
}




Re: Help me system is not running - iLearner - 20.07.2018

You're opening 4 brackets and closing only 2, that's all I can see from the code.


Re: Help me system is not running - linhpro200294 - 20.07.2018

So how do you do it with activity?


Re: Help me system is not running - AzaMx - 20.07.2018

Something like this

PHP код:
ServerHeartbeatTwo[1000]() {
    foreach(new 
iPlayer)
    {
        if(
IsPlayerInAnyVehicle(i))
        {
            if(
GetPlayerState(i) == PLAYER_STATE_PASSENGER)
            {
            if(
GetPlayerState(i) == PLAYER_STATE_DRIVERSetPlayerArmedWeapon(i0);
            else if(
PlayerInfo[i][pGuns][0] == && GetPlayerWeapon(i) == 0SetPlayerArmedWeapon(i0);
            else if(
PlayerInfo[i][pGuns][2] == 22 && GetPlayerWeapon(i) == 22SetPlayerArmedWeapon(i22);
            else if(
PlayerInfo[i][pGuns][2] == 24 && GetPlayerWeapon(i) == 24SetPlayerArmedWeapon(i24);
            else if(
PlayerInfo[i][pGuns][3] == 25 && GetPlayerWeapon(i) == 25SetPlayerArmedWeapon(i25);
            else if(
PlayerInfo[i][pGuns][4] == 28 && GetPlayerWeapon(i) == 2 SetPlayerArmedWeapon(i2;
            else if(
PlayerInfo[i][pGuns][4] == 29 && GetPlayerWeapon(i) == 29SetPlayerArmedWeapon(i29);
            else if(
PlayerInfo[i][pGuns][5] == 30 && GetPlayerWeapon(i) == 30SetPlayerArmedWeapon(i30);
            else if(
PlayerInfo[i][pGuns][5] == 31 && GetPlayerWeapon(i) == 31SetPlayerArmedWeapon(i31);
            else if(
PlayerInfo[i][pGuns][4] == 32 && GetPlayerWeapon(i) == 32SetPlayerArmedWeapon(i32);
            }
        }
    }




Re: Help me system is not running - linhpro200294 - 20.07.2018

it still does not work?


Re: Help me system is not running - AzaMx - 20.07.2018

PHP код:
ServerHeartbeatTwo[1000]() { 
    foreach(new 
iPlayer
    { 
        if(
IsPlayerInAnyVehicle(i)) 
        { 
            if(
GetPlayerState(i) == PLAYER_STATE_PASSENGER
            { 
            if(
GetPlayerState(i) == PLAYER_STATE_DRIVERSetPlayerArmedWeapon(i0); 
            else if(
PlayerInfo[i][pGuns][0] == && GetPlayerWeapon(i) == 0SetPlayerArmedWeapon(i0); 
            else if(
PlayerInfo[i][pGuns][2] == 22 && GetPlayerWeapon(i) == 22SetPlayerArmedWeapon(i22); 
            else if(
PlayerInfo[i][pGuns][2] == 24 && GetPlayerWeapon(i) == 24SetPlayerArmedWeapon(i24); 
            else if(
PlayerInfo[i][pGuns][3] == 25 && GetPlayerWeapon(i) == 25SetPlayerArmedWeapon(i25); 
            else if(
PlayerInfo[i][pGuns][4] == 28 && GetPlayerWeapon(i) == 28SetPlayerArmedWeapon(i28);
            else if(
PlayerInfo[i][pGuns][4] == 29 && GetPlayerWeapon(i) == 29SetPlayerArmedWeapon(i29); 
            else if(
PlayerInfo[i][pGuns][5] == 30 && GetPlayerWeapon(i) == 30SetPlayerArmedWeapon(i30); 
            else if(
PlayerInfo[i][pGuns][5] == 31 && GetPlayerWeapon(i) == 31SetPlayerArmedWeapon(i31); 
            else if(
PlayerInfo[i][pGuns][4] == 32 && GetPlayerWeapon(i) == 32SetPlayerArmedWeapon(i32); 
            } 
        } 
    } 

Try this.


Re: Help me system is not running - linhpro200294 - 20.07.2018

it still does not work you?


Re: Help me system is not running - CodeStyle175 - 20.07.2018

again use get function for one time only when possible


Re: Help me system is not running - linhpro200294 - 20.07.2018

If you have a link to Drive By Guns then please send me, please?


Re: Help me system is not running - GTLS - 20.07.2018

What are new errors you're facing after changing the code? and Its better if you convert this function to a ptask one. It will be efficient.




((you cant create a successful community with NGG script tho. Its old and everyone has it, why would they play on yours? Think about it. Use this to learn but dont use this.))