ZenScript
ZenScript copied to clipboard
[Enhancement] typeof
ZenScript doesn't require a typename for declaring a variable, but is still very strict with types. However, the documentation sometimes does not describe the types accurately.
I suggest adding a global keyword or global function typeof
which return the type of a value as string. This can make debugging much easier.
(Please let me know if there is already one)
Hey there, and sorry for the late reply ^^'.
I feel like adding another keyword to ZS at this point would carry too much of a risk to break existing scripts. However @TheSilkMiner has created a mod that offers some methods get the type of an object iirc. See this (currently still open) PR for more information: https://github.com/CraftTweaker/CraftTweaker-Documentation/pull/286