///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
| 1319 | ////////////////////////////////////////////////////////////////////// |
| 1320 | ////////////////////////////////////////////////////////////////////// |
| 1321 | int CScriptSystem::BeginCall(HSCRIPTFUNCTION hFunc) |
| 1322 | { |
| 1323 | assert(hFunc != 0); |
| 1324 | if (!hFunc) |
| 1325 | return 0; |
| 1326 | |
| 1327 | lua_getref(L, (int)(INT_PTR)hFunc); |
| 1328 | if (!lua_isfunction(L, -1)) |
| 1329 | { |
| 1330 | #if defined(__GNUC__) |
| 1331 | ScriptWarning("[CScriptSystem::BeginCall] Function Ptr:%d not found", (int)(INT_PTR)hFunc); |
| 1332 | #else |
| 1333 | ScriptWarning("[CScriptSystem::BeginCall] Function Ptr:%d not found", hFunc); |
| 1334 | #endif |
| 1335 | m_nTempArg = -1; |
| 1336 | lua_pop(L, 1); |
| 1337 | return 0; |
| 1338 | } |
| 1339 | m_nTempArg = 0; |
| 1340 | |
| 1341 | return 1; |
| 1342 | } |
| 1343 | |
| 1344 | ////////////////////////////////////////////////////////////////////// |
| 1345 | ////////////////////////////////////////////////////////////////////// |
no test coverage detected