Profile
|
  |
| Joined: 27 Dec 2008 |
| Total Posts: 125 |
|
|
| 12 Dec 2011 08:49 PM |
Alrighty so i keep getting this iritating error when i try to call this function:
static in LuaYield(lua_State *L) {
return lua_yield(L,1);
}
[...] //some where in registration lua_register(L,"Yield",LuaYield);
basicly its supposed to stop a thread i have going in C++ but when ever i call the function in lua (Yield() ) it gives me this:
attempt to yield across metamethod/C-call boundary
any help? |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2011 08:55 PM |
"basicly its supposed to stop a thread i have going in C++ but when ever i call the function in lua (Yield() ) it gives me this:" You're trying to call a C(++) function after yielding a coroutine. That's illegal. [/pretendingToKnowThingsAboutCoroutines] |
|
|
| Report Abuse |
|
|
Profile
|
  |
| Joined: 27 Dec 2008 |
| Total Posts: 125 |
|
|
| 12 Dec 2011 08:57 PM |
| merlin im calling it to yield one. |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2011 09:04 PM |
| Yes, but do you call a C(++) function before you resume? I remember that being some sort of a reason why it would give that error. |
|
|
| Report Abuse |
|
|
Profile
|
  |
| Joined: 27 Dec 2008 |
| Total Posts: 125 |
|
|
| 12 Dec 2011 09:06 PM |
| Never mind figured out a better system :3 |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2011 09:08 PM |
| And I was just about to say about how I should stop talking because I don't understand this error (because I don't understand coroutines on the C side.) |
|
|
| Report Abuse |
|
|