ShadowMario / FNF-PsychEngine

Engine originally used on Mind Games mod
Apache License 2.0
1.15k stars 2.23k forks source link

runHaxeCode() problem with LUA #15713

Open VoidedBattery opened 1 month ago

VoidedBattery commented 1 month ago

Describe your bug here.

Running LUA scripts with multiple haxeCodes will only run the first loaded script.

function onCreate()
    runHaxeCode([[debugPrint(2);]]);
    runHaxeCode([[debugPrint(3);]]);
end

function onBeatHit()
    runHaxeCode([[debugPrint(]] .. curBeat .. [[);]]);  
end

When onCreate() runs, 2 will be printed twice instead of 2 and 3. When onBeatHit() runs, 2 will be printed instead of the current beat number.

Command Prompt/Terminal logs (if existing)

No response

Are you modding a build from source or with Lua?

Lua

What is your build target?

Windows

Did you edit anything in this build? If so, mention or summarize your changes.

No

DARKTORTA commented 1 month ago

Screenshot_2024-10-15-08-21-09-017_com discord-edit Actually psych 1.0 is broken, i think we need wait for an update