We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I've been trying to code a little randomized event but when I try using math.random(min, max); it only gives me its max number
The codeline :
function onStepHit() next_block = math.random(1, 3); end
The value "next_block" only returns as whatever the max for math.random is, what am I doing wrong?
More information to help :
Psych Version : 0.6.2 (Modified only on the stuff listed in the "Did you edit anything in this build?" part)
I also tried changing it to getRandomInt(min, max) but that one had the same issue
Lua
Windows x64
healthloss by misses is higher, winning icons are a thing, and discord rich pressence is now themed on the mod.
The text was updated successfully, but these errors were encountered:
Update, nvm I found a fix, just needed to add math.randomseed(os.time())
I'll just close the issue 👍
Sorry, something went wrong.
No branches or pull requests
Describe your problem here.
I've been trying to code a little randomized event but when I try using math.random(min, max); it only gives me its max number
The codeline :
function onStepHit()
next_block = math.random(1, 3);
end
The value "next_block" only returns as whatever the max for math.random is, what am I doing wrong?
More information to help :
Psych Version : 0.6.2 (Modified only on the stuff listed in the "Did you edit anything in this build?" part)
I also tried changing it to getRandomInt(min, max) but that one had the same issue
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.
healthloss by misses is higher, winning icons are a thing, and discord rich pressence is now themed on the mod.
The text was updated successfully, but these errors were encountered: