override bool Morph crashes

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: override bool Morph crashes

Re: override bool Morph crashes

by Boondorl » Mon Nov 04, 2024 9:59 pm

It's because you're missing the return value. This is a currently known bug with the ZScript parser where for some reason functions that expect a return that don't have one simply crash instead of throwing an error. The likely cause is a missing null check

Re: override bool Morph crashes

by Rachael » Mon Nov 04, 2024 1:45 pm

Yet another bug with the file system, I can't fix this one because I am not familiar with what Graf was doing with the new system or how it works.

In the future it really does help if you post minimal examples that can be easily run without requiring assembly - that is infinitely more useful than just posting code snippets, and even the crash logs themselves as well.
Attachments
this-crashes-gzdoom.pk3
(443 Bytes) Downloaded 38 times

override bool Morph crashes

by SPZ1 » Mon Nov 04, 2024 11:50 am

For some reason, adding this code to my DoomPlayer caused it to crash.

https://1drv.ms/u/c/f562b31d53640a9e/Ef ... A?e=HffrDg

Code: Select all

override bool Morph(Actor activator, class<PlayerPawn> playerclass, class<MorphedMonster> monsterclass, int duration, int style, class<Actor> morphflash, class<Actor>unmorphflash){
		
	super.Morph(activator, playerclass, monsterclass, duration, style, morphflash, unmorphflash);
}

Top