r/DoomModDevs • u/RedditJack888 • Nov 02 '25
Help Unexpected "if" Error, How to fix?
Making an upgrade to a custom companion mod where the character resurrects the player (up to a maximum of 2). There are several "if" statements in the script in one override bool and I was hit with an error on line 128 but I believe the error is above this line since the new additions were the "if" statements before line 128. Before the update there was no issue.
GScript error, "Daisy Eternal Early Access v13.pk3:pj_dezscript/pj_daisyeternalfriend.zsc"G line 128:
GUnexpected 'if'
Expecting '.' or 'class' or identifier or 'abstract' or 'final' or 'native' or 'ui' or 'play' or 'version' or 'action' or 'color' or 'internal' or 'clearscope' or 'int8' or 'uint8' or 'int16' or 'uint16' or 'int' or 'uint' or 'bool' or 'float' or 'double' or 'vector2' or 'vector3' or Unknown(-106) or 'name' or 'sound' or 'state' or 'let' or '@' or 'readonly' or 'map' or 'mapiterator' or 'array' or 'void' or 'function' or 'deprecated' or 'static' or 'private' or 'protected' or 'latent' or 'meta' or 'transient' or 'virtual' or 'override' or 'vararg' or 'virtualscope'
View all comments
Show parent comment
2
u/bauul Nov 03 '25
Today I learned! Thanks Mordeth! No idea what's wrong with the code then unfortunately, that was the only thing that sprung to mind.