• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Lua syntax check

Status
Not open for further replies.
Level 10
Joined
Mar 26, 2017
Messages
378
I enjoy using Lua for mapping, and I prefer it to JASS in nearly every aspect.
Just one thing that hinders my map development, is a thread crash that occurs from using an invalid type for a native function.

I was wondering if someone here knows of a tool where I can put in my code and search for situations that would result in a crash.
 
I was wondering if someone here knows of a tool where I can put in my code and search for situations that would result in a crash.
I think a lot of modders like TriggerHappy use TypeScript for this reason. Similar to vJASS, it is transpiled into Lua when building the map script. Unlike Lua, TypeScript is strongly typed so will pick up such errors at TypeScript transpile time similar to traditional JASS compile time.
 
Just wondering though, does this also require you to define the native functions in Typescript then?
I do not know as I have not used the system. I would imagine that all such definitions and the like will have already been done by someone seeing how TriggerHappy and people are already using TypeScript to make maps.
 
Yes, it requires native functions declarations.
Some people have already done the declarations, Personally i use MindWorX's declarations, althou i have modified some of them as i have been going.
They were auto parsed mostly so they are not perfect yet sadly.

They are attached to this post.

Some other stuff is needed too, ofc you need an IDE that support TS like visual code or IntelliJ. Since TS to lua and Ceres is generally used, both me and MindWorX use NPM to handle most of that.
 

Attachments

Status
Not open for further replies.
Back
Top