Log in to reply
 

Gunseizure.cs from Violence Overhaul (ZIPPO)



  • Hi,

    I have this error in my log :

    [16:23:00] [ERROR] Failed to compile 'gunseizure.cs' with 1 error(s):
    at line 54: Type or namespace definition, or end-of-file expected

    Any idea ? I checked the line 54 and there is actually no codes (the line 54 is after "Function.Call(Hash.APPLY_DAMAGE_TO_PED, p, 200, 200);") :

    using System;
    using GTA;
    using GTA.Native;
    using System.Windows.Forms;

    namespace Seizure
    {
    public class Seizure : Script
    {

        public Seizure()
        {
            Tick += OnTick;
        }
    
        public void OnTick(object sender, EventArgs e)
        {
            Ped[] nearbyPeds = World.GetNearbyPeds(Game.Player.Character, 5000);
            foreach (Ped p in nearbyPeds)
            {
                if (Game.Player.Character.IsShooting)
                {
                    if (Game.Player.IsTargetting((Ped)p))
                    {
                        Random rand = new Random();
                        int chance = rand.Next(1, 100);
                        if (chance <= 20)
                        {
                            Function.Call(Hash.PLAY_PAIN, p, "DYING_HELP", "SPEECH_PARAMS_ALLOW_REPEAT", 0);
                            Function.Call(Hash.SET_PED_TO_RAGDOLL, p, 20000, 20000, true, true, true);
                            Function.Call(Hash.CREATE_NM_MESSAGE, true, 0);
                            Function.Call(Hash.GIVE_PED_NM_MESSAGE, p);
                            Function.Call(Hash.CREATE_NM_MESSAGE, true, 526);
                            Function.Call(Hash.GIVE_PED_NM_MESSAGE, p);
                            Function.Call(Hash.CREATE_NM_MESSAGE, true, 372);
                            Function.Call(Hash.GIVE_PED_NM_MESSAGE, p);
                            Function.Call(Hash.TASK_WRITHE, p, Game.Player.Character, -1, 0);
                            {
                                if (p.IsSittingInVehicle())
                                {
                                    Function.Call(Hash.APPLY_DAMAGE_TO_PED, p, 200, 200);
                                }
                            }
                        }
                    }
                }
                if (p.IsRagdoll | p.IsInjured)
                    Function.Call(Hash.PLAY_PAIN, p, 7, 0, 0);
                    Function.Call(Hash.APPLY_PED_BLOOD, p, 24818, 0, 0, 0, "Bullet_Large");
                }
            }
        }
    }
    

    }

    Thank you in advance !



  • extra bracket at the end?



  • @ahmadnaim93
    Honestly I can't tell... I guess I have to try but I'll wait a bit for a clue. Thanks for your feedback, I'll keep that in mind, maybe you're right!



  • There should be a { after "if (p.IsRagdoll | p.IsInjured)"



  • @Jitnaught
    Oh yes I see !! Thank you very much :)


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.