///////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////
| 1162 | ////////////////////////////////////////////////////////////////////// |
| 1163 | ////////////////////////////////////////////////////////////////////// |
| 1164 | int CScriptSystem::BeginCall(HSCRIPTFUNCTION hFunc) |
| 1165 | { |
| 1166 | // alberto_pushfunc(m_pLS,hFunc); |
| 1167 | m_nTempTop = lua_gettop(m_pLS); |
| 1168 | if(hFunc==0) |
| 1169 | { |
| 1170 | RaiseError("(BeginCall) failed NULL parameter"); |
| 1171 | m_nTempArg = -1; |
| 1172 | return 0; |
| 1173 | } |
| 1174 | |
| 1175 | if(!lua_getref(m_pLS, (int)hFunc)) |
| 1176 | { |
| 1177 | m_nTempArg = -1; |
| 1178 | return 0; |
| 1179 | } |
| 1180 | if(!lua_isfunction(m_pLS,-1)) |
| 1181 | { |
| 1182 | RaiseError("Function Ptr:%d not found",hFunc); |
| 1183 | m_nTempArg = -1; |
| 1184 | return 0; |
| 1185 | } |
| 1186 | m_nTempArg = 0; |
| 1187 | |
| 1188 | |
| 1189 | return 1; |
| 1190 | } |
| 1191 | |
| 1192 | ////////////////////////////////////////////////////////////////////// |
| 1193 | ////////////////////////////////////////////////////////////////////// |
no test coverage detected