ikemen-engine / Ikemen-GO

An open-source fighting game engine that supports MUGEN resources.
https://ikemen-engine.github.io
Other
700 stars 124 forks source link

sprpriority SCTRL is broken in ZSS syntax #1988

Open Jesuszilla opened 1 week ago

Jesuszilla commented 1 week ago

Describe the bug

sprpriority can't be used without wrapping it with an if statement, and even then, only if it's on one line

To Reproduce

Try the following code anywhere in ZSS. It will crash I.K.E.M.E.N with an error:

sprpriority{ value: 2; layerno: 0; }

The following will also crash the engine:

if 1 {
    sprpriority{ value: 2; layerno: 0; }
}

However, this works:

if 1 {sprpriority{ value: 2; layerno: 0; }}

Expected behavior

I should be able to write the sprpriority SCTRL normally, without having to wrap an if around it.

Screenshots / Video

No response

Engine Version (or source code date)

Nightly

Operating system

macOS

Extra context or search terms

No response

Wftk commented 1 week ago

weird, it doesnt crash for me and sctrl do work fine.

potsmugen commented 1 week ago

Yeah. The two examples don't crash for me either and they do change sprpriority.

However there's the fact that there's a trigger and a state controller with the exact same name. Might cause issues somewhere. And it's not like Helper either where you can see what comes next to tell if it's a trigger or sctrl.

Jesuszilla commented 1 week ago

Hmm. Maybe the location does matter? I tried -2 and I think -3 if that matters. Doing it in state 0, I apparently get no "Nothing assigned" error.

K4thos commented 1 week ago

pasted to kfmz negative states - can't reproduce.