Couple of errors help please
#1

Errors please help

C:\Users\Itzgamecast\Desktop\UVRP SCRIPT\gamemodes\UGRP [NEW].pwn(16094) : warning 217: loose indentation
C:\Users\Itzgamecast\Desktop\UVRP SCRIPT\gamemodes\UGRP [NEW].pwn(1614 : error 010: invalid function or declaration



pawn Код:
if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
    {
        if(GetPVarInt(playerid, "NGPassenger") == 1)
        {
            TogglePlayerSpectating(playerid, 0);
        }
        if(GetPVarInt(playerid, "UsingSprunk"))
        {
            DeletePVar(playerid, "UsingSprunk");
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
            return 1;
        }
    }
    if(GetPVarInt(playerid, "MovingStretcher") != -1)
        {
            KillTimer(GetPVarInt(playerid, "TickEMSMove"));
            MoveEMS(playerid);
            return 1;
        }
       >>>>> other lineif(GetPVarInt(playerid, "editingcdvehpos"))
        {
            TogglePlayerControllable(playerid, false);
            ShowPlayerDialog(playerid,DIALOG_CDEDITPARK,DIALOG_STYLE_MSGBOX,"Warning:","Is this the new position you want?","Ok","Cancel");
        }
        if(GetPVarInt(playerid, "editingcdvehnew"))
        {
            TogglePlayerControllable(playerid, false);
            ShowPlayerDialog(playerid,DIALOG_CDEDITPARK,DIALOG_STYLE_MSGBOX,"Warning:","Is this the new position you want?","Ok","Cancel");
        }
        if(GetPVarInt(playerid, "editingfamhq") != 255)
        {
            if(GetPVarInt(playerid, "editingfamhqaction") == 1)
            {
                DeletePVar(playerid, "editingfamhqaction");
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQENTRANCE,DIALOG_STYLE_MSGBOX,"Warning:","Is this the entrance you want?","Ok","Cancel");
            }
            else if(GetPVarInt(playerid, "editingfamhqaction") == 2)
            {
                DeletePVar(playerid, "editingfamhqaction");
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQEXIT,DIALOG_STYLE_MSGBOX,"Warning:","Is this the exit you want?","Ok","Cancel");
            }
            else if(GetPVarInt(playerid, "editingfamhqaction") == 5)
            {
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQENTRANCE,DIALOG_STYLE_MSGBOX,"Warning:","Is this the entrance you want?","Ok","Cancel");
            }
            else if(GetPVarInt(playerid, "editingfamhqaction") == 6)
            {
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQEXIT,DIALOG_STYLE_MSGBOX,"Warning:","Is this the exit you want?","Ok","Cancel");
            }

        }
        new Float:health;
        GetPlayerHealth(playerid, health);

        if(GetPVarInt(playerid, "UsingSprunk"))
        {
            new hpint = floatround( health, floatround_round );
            if( hpint >= 100 )
            {
                SendClientMessageEx(playerid, COLOR_GREY, " You already have full health.");
                return 1;
            }
            else
            {
                GetPlayerHealth(playerid, health);
                SetPlayerHealth(playerid, health+1.0);
            }
        }
    }
>>>> 16148  return 1;
}
Reply
#2

You have an extra closing }.
pawn Код:
if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
    {
        if(GetPVarInt(playerid, "NGPassenger") == 1)
        {
            TogglePlayerSpectating(playerid, 0);
        }
        if(GetPVarInt(playerid, "UsingSprunk"))
        {
            DeletePVar(playerid, "UsingSprunk");
            SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
            return 1;
        }
    }
    if(GetPVarInt(playerid, "MovingStretcher") != -1)
        {
            KillTimer(GetPVarInt(playerid, "TickEMSMove"));
            MoveEMS(playerid);
            return 1;
        }
       >>>>> other lineif(GetPVarInt(playerid, "editingcdvehpos"))
        {
            TogglePlayerControllable(playerid, false);
            ShowPlayerDialog(playerid,DIALOG_CDEDITPARK,DIALOG_STYLE_MSGBOX,"Warning:","Is this the new position you want?","Ok","Cancel");
        }
        if(GetPVarInt(playerid, "editingcdvehnew"))
        {
            TogglePlayerControllable(playerid, false);
            ShowPlayerDialog(playerid,DIALOG_CDEDITPARK,DIALOG_STYLE_MSGBOX,"Warning:","Is this the new position you want?","Ok","Cancel");
        }
        if(GetPVarInt(playerid, "editingfamhq") != 255)
        {
            if(GetPVarInt(playerid, "editingfamhqaction") == 1)
            {
                DeletePVar(playerid, "editingfamhqaction");
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQENTRANCE,DIALOG_STYLE_MSGBOX,"Warning:","Is this the entrance you want?","Ok","Cancel");
            }
            else if(GetPVarInt(playerid, "editingfamhqaction") == 2)
            {
                DeletePVar(playerid, "editingfamhqaction");
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQEXIT,DIALOG_STYLE_MSGBOX,"Warning:","Is this the exit you want?","Ok","Cancel");
            }
            else if(GetPVarInt(playerid, "editingfamhqaction") == 5)
            {
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQENTRANCE,DIALOG_STYLE_MSGBOX,"Warning:","Is this the entrance you want?","Ok","Cancel");
            }
            else if(GetPVarInt(playerid, "editingfamhqaction") == 6)
            {
                TogglePlayerControllable(playerid, false);
                ShowPlayerDialog(playerid,HQEXIT,DIALOG_STYLE_MSGBOX,"Warning:","Is this the exit you want?","Ok","Cancel");
            }

        }
        new Float:health;
        GetPlayerHealth(playerid, health);

        if(GetPVarInt(playerid, "UsingSprunk"))
        {
            new hpint = floatround( health, floatround_round );
            if( hpint >= 100 )
            {
                SendClientMessageEx(playerid, COLOR_GREY, " You already have full health.");
                return 1;
            }
            else
            {
                GetPlayerHealth(playerid, health);
                SetPlayerHealth(playerid, health+1.0);
            }
        }
>>>> 16148  return 1;
}
This should work
Reply
#3

Thanks worked just need to edit some of its indentation but after that it was all perfect
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)