• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Lua] Basic lua functions

Status
Not open for further replies.
Level 18
Joined
Jan 1, 2018
Messages
728
I checked all functions for lua 5.3 by comparing them to nil. You can see the result in the image below. Functions highlighted red cannot be used.
Lua wc3 functions.png

You can find the list of functions and see their documentation here.
 
Last edited:
Level 18
Joined
Jan 1, 2018
Messages
728
coroutine.wrap doesn't work when I've tried it. It is supposed to be the same as resume(create) but instead does nothing.
From the documentation: "Returns a function that resumes the coroutine each time it is called." I tried with the following code and it works:
Lua:
local Test = function(msg)
    print(msg)
end
local co = coroutine.wrap(Test)
co("Hello world")
 
Status
Not open for further replies.
Top