I'm trying but my function doesn't work. What am I doing wrong?
print('Hello!'); -- test passed, the mod is working
require "recipecode"
local old_RipClothing_OnCreate = RipClothing_OnCreate;
if not old_RipClothing_OnCreate then
error('ERROR: Cant inject into RipClothing_OnCreate'); -- test passed (no error, defualt function found)
end
function RipClothing_OnCreate(items, result, player, ...) -- trying overwrite
print('Huh?'); -- test not passed! the code does not work
return old_RipClothing_OnCreate(items, result, player, ...)
end