Spanden Posted December 1, 2018 Share Posted December 1, 2018 I need smth like this: local oldSetPause=GLOBAL.SetPause function newSetPause() my_function() oldSetPause() end GLOBAL.SetPause=newSetPause but it doesn't work. Where is my mistake? Link to comment Share on other sites More sharing options...
CarlZalph Posted December 1, 2018 Share Posted December 1, 2018 @Spanden You've left out function argument parameters. function newSetPause(...) + oldSetPause(...) If you want to know the arguments and to future proof it: function newSetPause(val, reason, ...) + oldSetPause(val, reason, ...) The three dots for an argument means in LUA: "There are any amount of additional arguments here, please handle all of them for me." It can only exist as the last argument in a function declaration. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.