- InventoryLocation loc;
- loc.setDetached(name);
- InvRef::create(L, loc);
- lua_pushstring(L, from_list.c_str()); // from_list
- lua_pushinteger(L, from_index + 1); // from_index
- lua_pushstring(L, to_list.c_str()); // to_list
- lua_pushinteger(L, to_index + 1); // to_index
- lua_pushinteger(L, count); // count
- objectrefGetOrCreate(player); // player
- if(lua_pcall(L, 7, 0, errorhandler))
- scriptError();
- lua_pop(L, 1); // Pop error handler
+ InvRef::create(L, ma.from_inv);
+ lua_pushstring(L, ma.from_list.c_str()); // from_list
+ lua_pushinteger(L, ma.from_i + 1); // from_index
+ lua_pushstring(L, ma.to_list.c_str()); // to_list
+ lua_pushinteger(L, ma.to_i + 1); // to_index
+ lua_pushinteger(L, count); // count
+ objectrefGetOrCreate(L, player); // player
+ PCALL_RES(lua_pcall(L, 7, 0, error_handler));
+ lua_pop(L, 1); // Pop error handler