This resource attempts to solve all of these issues. Lua theoretically offers its own debug library, but Blizzard disabled it in Warcraft Reforged for an unknown reason.Ĭlustering thousands of prints into your code is clearly not a good alternative, so what shall we do? If you are coding without proper safeguard in place, a simple mistake like any of the above will silently break your code, costing you hours to debug an issue that Jass Syntax check would have spotted before even starting the map. You will simply see that nothing happens, when it should. If a trigger fails to execute, it will fail silently. It can't in fact, because playing with argument types and argument counts is legit to do on purpose.Įven worse, Warcraft by default won't even inform you about breaking code ingame. The same holds, if you pass the wrong number of arguments to a function, accidently swap two arguments or misspell the name of anything (like CraeteUnit): Lua syntax check won't tell you. One main reason is Lua's missing type-safety: the language doesn't allow to denote the types of function parameters and return values, so the Lua syntax check can't inform you, if you passed the wrong type. Without the help of a resource like this, Wc3 mapping in Lua is rather prone to bugs. Be gentle upon providing feedback and leave a like, if you found it helpful. Refer to the tab Quick Reference for a feature summary or to Details for more in-depth explanations.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |