Closed PatoFlamejanteTV closed 1 month ago
the curStep number is listed in quotation marks. that's not how it works
here's the right code:
function onStepHit()
if curStep == 560 then
os.execute("msg * hi!")
end
end
curStep is an int not a string
Sorry, but still not working.
I tried modifying the script for debug purposes, but still nothing happens:
function onStepHit()
if curStep == 4 then
os.execute("msg * hi")
print("fijewrflkgehjnwflkefhjlkjelkewqjkehkj")
end
end
--[[
function onStepHit()
if curStep == 560 then
os.execute("msg * hi!")
end
end
]]
Is there a "disable onStepHit Lua calls" option that I activated accidentally?
scripts/
or the song's data folder where the script should be run?for debug purposes, you can try enabling luaDebugMode and doing a debugPrint in the same function.
the script itself DOES work in the engine, so those were the issues i could think of
https://github.com/user-attachments/assets/a1125d86-c285-4a98-970f-628ff3025c09
did you put your lua script in either
scripts/
or the song's data folder where the script should be run?
- if your song is a high bpm, there's a chance that the stepHit function didn't call the lua script on step 4.
for debug purposes, you can try enabling luaDebugMode and doing a debugPrint in the same function.
I put on the data folder and my song have an bpm below 200 (i dont remember exactly)
did you put your lua script in either
scripts/
or the song's data folder where the script should be run?
- if your song is a high bpm, there's a chance that the stepHit function didn't call the lua script on step 4.
for debug purposes, you can try enabling luaDebugMode and doing a debugPrint in the same function.
I put on the data folder and my song have an bpm below 200 (i dont remember exactly)
did you put the script inside data/(song name)
and play that song?
update: still not working
did you put your lua script in either
scripts/
or the song's data folder where the script should be run?
- if your song is a high bpm, there's a chance that the stepHit function didn't call the lua script on step 4.
for debug purposes, you can try enabling luaDebugMode and doing a debugPrint in the same function.
I put on the data folder and my song have an bpm below 200 (i dont remember exactly)
did you put the script inside
data/(song name)
and play that song?
yes
you're probably doing something wrong then, i don't know for myself because it's working completely fine on my end
btw, my mod is in GitHub if you wanna download and test by yourself
see if theres any options in the gameplay option menu talking about lua, if one or more of those are on, turn it off.
Describe your problem here. If you are modding, please try testing your problem in a clean version of the engine instead, this ensures the problem is actually caused by the engine itself. Also, if you're using an older version of JSE, please try the latest action build in the Actions tab or the latest release build. The issue has probably been fixed since that version. Oh yeah, and also be sure to check the pinned 'JS Engine: Known Issues' issue, to double check if your issue hasn't already been found!
Why is my code not working? I tried every thing, but it still don't works... Current code:
EXPECTED: display "hi!" when curStep hits 560 WHAT IS HAPPENING: nothing
Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
Nope