lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello everyone,
can anyone explain me what's happening running this simple lua script:

--metaerror.lua
coroutine.create(coroutine.yield())


lua: attempt to yield across metamethod/C-call boundary
stack traceback:
	[C]: in function 'yield'
	/Users/veleno/Downloads/metaerror.lua:1: in main chunk
	[C]: ?


I've searched on google for that error, but many references belong to the interaction between C++ and Lua code. Here it's only Lua.
I agree that that kind of code is not really very useful..but I'd like to understand it.

Thanks,
valerio