Jump to content

coroutines no longer in LE's Lua build?[SOLVED]


Rick
 Share

Recommended Posts

When I run the following it says 'create' is a nil value.

 

local t = coroutine.create(function() end)

 

This is leading me to believe that coroutines aren't part of the Lua build LE is using? I know this worked back in Jan 14 as I was using coroutines then. Did something change with this?

 

When I look at the Lua source I see inside linit.c http://www.lua.org/source/5.2/linit.c.html that it inits a bunch of libraries. Josh did you comment out the coroutine one? If so can you put it back in? This is a very handy thing and shouldn't be any sort of security issue with it.

 

[EDIT]

Nevermind. My entity script I created was named coroutine.lua which overwrote Lua's coroutine table since it seems the script name is used to make a table in LE. Renamed my entity script to something else and it works now. Who would have thunk it smile.png

  • Upvote 5
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...