MathUtil is pissing me off #815
-
/**
* The code block is merely representative of what I have in my code and--obviously--doesn't match exactly.
* Comments are representative of what the console spits out whenever I run the respective functions.
*/
import funkin.backend.utils.MathUtil;
MathUtil.max(a, b, c, d, e) // Null Object Reference
MathUtil.maxSmart(a, b, c, d, e) // Null Function Pointer
MathUtil.maxInt(a, b, c, d, e) // Null Object ReferenceI'm at a loss for words. All three of these functions exist within MathUtil and the wiki, but none of the work in HScript. I'm on v1.0.1, and I'm using this in a ModState. I really don't want to nest Math.max's, and the function ought to work anyway. Please help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
Extra context: I'm trying to make a slicesprite that
Also, I recall trying to use |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.


For your information, hscript-improved has the following limitation, which doesn't appear to be addressed:
You likely need to split the variable declaration into separate
varstatements to ensure that you don't have issues with variable declarations. So, you will likely need to change lines 75 to 78 to the following: