test( { x = 123, y = 456 } ); */
| 1397 | test( { x = 123, y = 456 } ); |
| 1398 | */ |
| 1399 | staticfn int |
| 1400 | nhl_test(lua_State *L) |
| 1401 | { |
| 1402 | coordxy x, y; |
| 1403 | char *name, Player[] = "Player"; |
| 1404 | |
| 1405 | /* discard any extra arguments passed in */ |
| 1406 | lua_settop(L, 1); |
| 1407 | |
| 1408 | luaL_checktype(L, 1, LUA_TTABLE); |
| 1409 | |
| 1410 | x = (coordxy) get_table_int(L, "x"); |
| 1411 | y = (coordxy) get_table_int(L, "y"); |
| 1412 | name = get_table_str_opt(L, "name", Player); |
| 1413 | |
| 1414 | pline("TEST:{ x=%i, y=%i, name=\"%s\" }", (int) x, (int) y, name); |
| 1415 | |
| 1416 | free(name); |
| 1417 | |
| 1418 | return 1; |
| 1419 | } |
| 1420 | |
| 1421 | /* push a key into command queue */ |
| 1422 | /* nh.pushkey("i"); */ |
nothing calls this directly
no test coverage detected