Sometimes when player kills himself with rockets or pipebombs, VM execution aborted.
Please help, i really dont know why this is happening
Error message:
VM execution aborted: tried to read from address zero.
Called from PlayerPawn.Die at gzdoom.pk3:zscript/actors/player/player.zs, line 749
Called from Actor.A_Explode at gzdoom.pk3:zscript/actors/attacks.zs, line 601
Called from Duke_Rocket.StateFunction.2 at Nuketown.pk3:decorate, line 20
Called from state Duke_Rocket.2 in Duke_Rocket
Spoiler: Second error message
Spoiler: RPGCode: Select all
Class duke_rpg : Weapon { Default{+WEAPON.NOAUTOAIM; Weapon.SlotNumber 5; Weapon.SelectionOrder 1; Weapon.BobRangeX -1.2; Weapon.BobRangeY -0.8; Weapon.BobSpeed 1.2; Weapon.BobStyle "InverseSmooth"; Weapon.AmmoUse 1; Weapon.AmmoGive 5; Weapon.AmmoType "RockAmmo"; Scale 0.7; Inventory.PickupMessage "RPG (SLOT 5)"; Inventory.PickupSound "ROCKP";Weapon.UpSound "WeaponSelect"; } States { Check: TNT1 A 0 A_JumpIfInventory("KickAct",1,"Kick"); TNT1 A 1; Loop; Kick: TNT1 A 0 {If(GetCVAR("duke_mes") == 1) {A_Print("Mighty Foot Engaged");}} WP09 A 3; TNT1 A 0 A_RadiusGive("Duke_Beatable",160,RGF_NOTARGET|RGF_MONSTERS|RGF_NOSIGHT,3, limit : 3); WP09 E 6 A_CustomPunch(randompick(10,15,20),true,CPF_NORANDOMPUFFZ,"QuakyPuff",49); WP09 A 6; Goto Check; Ready: TNT1 A 0 A_Overlay (-5, "Check"); TNT1 A 0 A_OverlayFlags(-5,PSPF_ADDBOB,false); RReady: WP06 A 1 A_WeaponReady; Loop; Deselect: WP06 A 1 A_Lower(13); Loop; Select: WP06 A 1 A_Raise(4); WP06 A 1 A_Raise(4); WP06 A 1 A_Raise(5); WP06 A 1 A_Raise(5); WP06 A 1 A_Raise(8); WP06 A 1 A_Raise(8); WP06 A 1 A_Raise(8); WP06 AAAA 1 A_Raise(11); WP06 AAA 1 A_Raise(4); Loop; Fire: TNT1 A 0 A_ZoomFactor(0.98,ZOOM_NOSCALETURNING); TNT1 A 0 A_PlaySound ("Weaps/RPG", CHAN_WEAPON); TNT1 A 0 {A_FireProjectile("Duke_Rocket",0,true,4,-1);A_GunFlash();} TNT1 A 0 {if(GetCVAR("duke_rec") == 1){A_SetPitch(pitch - 0.62 * GetCVAR("duke_mult"));}} WP06 B 1 A_WeaponReady(WRF_NOFIRE|WRF_NOBOB|WRF_NOSWITCH); TNT1 A 0 A_Recoil(0.32); WP06 C 1; TNT1 A 0 A_ZoomFactor(1,ZOOM_NOSCALETURNING); WP06 DEFGH 1 Bright; WP06 I 5; WP06 HYZ 1; TNT1 A 0 {if(GetCVAR("duke_rec") == 1){A_SetPitch(pitch + 0.1 * GetCVAR("duke_mult"));}} WP06 J 1; TNT1 A 0 {if(GetCVAR("duke_rec") == 1){A_SetPitch(pitch + 0.08 * GetCVAR("duke_mult"));}} WP06 KCBAMNMA 1; WP06 A 2 A_WeaponReady; Goto RReady; Flash: TNT1 A 2 Bright A_Light1; TNT1 A 1 Bright A_Light0; Goto LightDone; Spawn: WP06 X -1; Stop; } }
Spoiler: RocketCode: Select all
ACTOR Duke_Rocket : Rocket { Speed 42 Damage 10 Scale 0.4 Alpha 1 Radius 6 Height 6 Decal "Scorch" DeathSound "SFX/Explode" +FORCERADIUSDMG -ROCKETTRAIL States { Spawn: PJ01 A 1 Bright A_SpawnItemEx("Duke_SparkSpawner",random(-1,1),random(-1,1),0,random(-2,2),random(-1,1)) TNT1 A 0 A_SpawnItemEx("Duke_PuffSmoke",0,0,0,0,0,2.2) Loop Death: TNT1 A 0 A_Explode(128,170,true,145) //Line 20 TNT1 A 0 A_SpawnItemEx("Duke_Smoke") TNT1 AAAA 0 A_SpawnItemEx("Duke_Smoke",0,0,0,random(-1,1),random(-1,1),random(1,4)) TNT1 A 0 A_CheckFloor("DeathFlamez") TNT1 AAA 0 A_SpawnItemEx("Duke_ExplosionFlame",frandom(-2,2),frandom(-2,2),frandom(-1,1),frandom(1,5) * RandomPick(-1,1),frandom(1,5) * RandomPick(-1,1),frandom(4,13)) TNT1 AA 0 A_SpawnItemEx("Duke_ExplosionFlame",frandom(-2,2),frandom(-2,2),frandom(-1,1),frandom(0,2) * RandomPick(-1,1),frandom(0,2) * RandomPick(-1,1),frandom(5,7)) TNT1 A 0 A_SpawnItemEx("Duke_Explosion") Stop DeathFlamez: TNT1 A 0 A_SpawnItemEx("Duke_SubExplosion") TNT1 A 0 A_SpawnItemEx("Duke_Explosion") TNT1 AAA 0 A_SpawnItemEx("Duke_ExplosionFlame",frandom(-2,2),frandom(-2,2),frandom(0,2),frandom(1,5) * RandomPick(-1,1),frandom(1,5) * RandomPick(-1,1),frandom(4,13)) TNT1 AA 0 A_SpawnItemEx("Duke_ExplosionFlame",frandom(-2,2),frandom(-2,2),frandom(0,2),frandom(0,2) * RandomPick(-1,1),frandom(0,2) * RandomPick(-1,1),frandom(5,7)) TNT1 A 0 Stop } }
Spoiler: PlayerCode: Select all
ACTOR DukePlayer : DoomPlayer replaces DoomPlayer { Player.StartItem "duke_foot", 1 Player.StartItem "duke_mon", 1 Player.StartItem "duke_dtn", 1 Player.CrouchSprite "DUKC" Player.WeaponSlot 1, duke_foot Player.WeaponSlot 2, duke_pstl, duke_dgl, duke_rvl Player.WeaponSlot 3, duke_shtg Player.WeaponSlot 4, duke_chn, duke_rfl Player.WeaponSlot 5, duke_rpg Player.WeaponSlot 6, duke_ppb Player.WeaponSlot 7, duke_shrk Player.WeaponSlot 8, duke_dvst Player.WeaponSlot 0, duke_frzr Speed 0.98 Scale 0.6 Health 100 GibHealth 10 Player.JumpZ 11 Player.ViewBob 0.2 Player.DisplayName "Duke Nukem" Player.SoundClass "duke" States { Spawn: DUKE A -1 Loop See: DUKE BCDE 4 Loop Missile: DUKE A 12 Bright Goto Spawn Melee: DUKE A 6 BRIGHT Goto Missile Pain: DUKE A 4 DUKE A 4 A_Pain Goto Spawn Death: DUKE FGH 6 DUKE I 4 A_PlayerScream DUKE J 4 A_NoBlocking DUKE K -1 Stop XDeath: TNT1 A 0 Stop } }