@@ -53,7 +53,7 @@ int ScriptApiNodemeta::nodemeta_inventory_AllowMove(v3s16 p,
53
53
lua_pushstring (L, to_list.c_str ()); // to_list
54
54
lua_pushinteger (L, to_index + 1 ); // to_index
55
55
lua_pushinteger (L, count); // count
56
- objectrefGetOrCreate (player); // player
56
+ objectrefGetOrCreate (L, player); // player
57
57
if (lua_pcall (L, 7 , 1 , m_errorhandler))
58
58
scriptError ();
59
59
if (!lua_isnumber (L, -1 ))
@@ -88,7 +88,7 @@ int ScriptApiNodemeta::nodemeta_inventory_AllowPut(v3s16 p,
88
88
lua_pushstring (L, listname.c_str ()); // listname
89
89
lua_pushinteger (L, index + 1 ); // index
90
90
LuaItemStack::create (L, stack); // stack
91
- objectrefGetOrCreate (player); // player
91
+ objectrefGetOrCreate (L, player); // player
92
92
if (lua_pcall (L, 5 , 1 , m_errorhandler))
93
93
scriptError ();
94
94
if (!lua_isnumber (L, -1 ))
@@ -123,7 +123,7 @@ int ScriptApiNodemeta::nodemeta_inventory_AllowTake(v3s16 p,
123
123
lua_pushstring (L, listname.c_str ()); // listname
124
124
lua_pushinteger (L, index + 1 ); // index
125
125
LuaItemStack::create (L, stack); // stack
126
- objectrefGetOrCreate (player); // player
126
+ objectrefGetOrCreate (L, player); // player
127
127
if (lua_pcall (L, 5 , 1 , m_errorhandler))
128
128
scriptError ();
129
129
if (!lua_isnumber (L, -1 ))
@@ -161,7 +161,7 @@ void ScriptApiNodemeta::nodemeta_inventory_OnMove(v3s16 p,
161
161
lua_pushstring (L, to_list.c_str ()); // to_list
162
162
lua_pushinteger (L, to_index + 1 ); // to_index
163
163
lua_pushinteger (L, count); // count
164
- objectrefGetOrCreate (player); // player
164
+ objectrefGetOrCreate (L, player); // player
165
165
if (lua_pcall (L, 7 , 0 , m_errorhandler))
166
166
scriptError ();
167
167
}
@@ -190,7 +190,7 @@ void ScriptApiNodemeta::nodemeta_inventory_OnPut(v3s16 p,
190
190
lua_pushstring (L, listname.c_str ()); // listname
191
191
lua_pushinteger (L, index + 1 ); // index
192
192
LuaItemStack::create (L, stack); // stack
193
- objectrefGetOrCreate (player); // player
193
+ objectrefGetOrCreate (L, player); // player
194
194
if (lua_pcall (L, 5 , 0 , m_errorhandler))
195
195
scriptError ();
196
196
}
@@ -219,7 +219,7 @@ void ScriptApiNodemeta::nodemeta_inventory_OnTake(v3s16 p,
219
219
lua_pushstring (L, listname.c_str ()); // listname
220
220
lua_pushinteger (L, index + 1 ); // index
221
221
LuaItemStack::create (L, stack); // stack
222
- objectrefGetOrCreate (player); // player
222
+ objectrefGetOrCreate (L, player); // player
223
223
if (lua_pcall (L, 5 , 0 , m_errorhandler))
224
224
scriptError ();
225
225
}
0 commit comments