Open Player701 opened 2 days ago
hmm, that shouldn't be triggering at all since it's defined as play scope, is the parser doing something funky to struct members? https://github.com/ZDoom/gzdoom/blob/master/src/common/scripting/frontend/zcc_compile.cpp#L2072
GZDoom version
4.13.2 and 4.14pre-76-gccd38afbc
Which game are you running with GZDoom?
Doom 2
What Operating System are you using?
Windows 11
Please describe your specific OS version
N/A
Relevant hardware info
N/A
Have you checked that no other similar issue already exists?
A clear and concise description of what the bug is.
This script works:
but change
class
tostruct
, and you get:Only
clearscope
seems to work; neitherplay
norui
does. Changing the scope of the struct itself toplay
orui
does not appear to have any effect either.However, it is possible to work around this by declaring the type as
Function<void>
, but then a cast to the proper type will be necessary in order to call the function declared this way. Which makes me think this is likely a bug in the compiler and not some kind of fundamental limitation of the ZScript architecture.Steps to reproduce the behaviour.
class
tostruct
in the script code and try againYour configuration
Provide a Log
N/A