Issue Data
|
Issue #32464: Potential missing safety check in Karstaag quest script
Error: Cannot call IsDead() on a None object, aborting function call
stack: [alias Karstaag on quest DLC2dunKarstaagQST (040247F8)].dlc2dunkarstaagbattlescript.RecordIceWraith() - "DLC2dunKarstaagBattleScript.psc" Line 180 [ (random id)].DLC2dunKarstaagIceWraithScript.OnLoad() - "DLC2dunKarstaagIceWraithScript.psc" Line 7 Basically the script for Karstaag's ice wraiths (04028246) doesn't account for what happens if they spawn without KarstaagAlias being filled. Now, I can't be sure if it's possible for this to happen during normal gameplay (maybe if a player saves and reloads at JUST the wrong point during the battle after killing Karstaag?) but it seems like it could be easily fixed just by adding a check to the script to confirm whether the alias is not None. as it stands the entire code is just Event OnLoad() (KarstaagAlias as DLC2dunKarstaagBattleScript).RecordIceWraith(Self) EndEvent So adding just an "if KarstaagAlias != none" before the RecordIceWraith call might be a good sanity check just in case. |
Sorry, I think I might have misunderstood the error message.
It might be that the Karstaag alias IS filling properly but then the "self" for the relevant ice wraith isn't being properly passed to the DLC2dunKarstaagBattleScript.
The code in that case is
So it's missing a safety check for if the selfActor isn't filled.
Might not be worth fixing considering how unlikely that is.
Sorry for the pointless ticket.
It might be that the Karstaag alias IS filling properly but then the "self" for the relevant ice wraith isn't being properly passed to the DLC2dunKarstaagBattleScript.
The code in that case is
Function RecordIceWraith(ObjectReference wraith) if (!selfActor.IsDead()) if (IceWraith01 == None || IceWraith01.IsDead()) IceWraith01 = wraith as Actor ElseIf (IceWraith02 == None || IceWraith02.IsDead()) IceWraith02 = wraith as Actor ElseIf (IceWraith03 == None || IceWraith03.IsDead()) IceWraith03 = wraith as Actor EndIf EndIf
So it's missing a safety check for if the selfActor isn't filled.
Might not be worth fixing considering how unlikely that is.
Sorry for the pointless ticket.
Comment #1 Jun 23, 2022 3:30 pm
Edited by DarthVitrial on Jun 23, 2022 3:33 pm
Don't worry about it. This battle sequence of theirs is a convoluted mess that's impossible to follow without spending hours on it.
The only way SelfActor could be null is if the quest isn't running and you'd only encounter it trying to come back to the location somewhere down the line.
The only way SelfActor could be null is if the quest isn't running and you'd only encounter it trying to come back to the location somewhere down the line.
Showing Comments 1 - 2 of 2