DJPaul Posted May 6, 2015 Share Posted May 6, 2015 When using SendModRPCToServer, is there any way to send extra args from the client to the server? I noticed in networkclientrpc.lua's SendModRPCToServer() that it supports a variable number of arguments, which it passes to TheNet:SendModRPCToServer. I see some built-in handlers in that same file that seem to support any number of custom arguments, but when I tried something like this http://imgur.com/mMkhbqS it didn't work (output was only "testing mctestington" -- varone + vartwo were empty). Link to comment https://forums.kleientertainment.com/forums/topic/53596-how-to-send-extra-args-with-sendmodrpctoserver/ Share on other sites More sharing options...
Developer PeterA Posted May 6, 2015 Developer Share Posted May 6, 2015 @DJPaul, looks like there's a bug in the mod api in modutil.lua, where the extra arguments to SendModRPCToServer aren't being passed along to the global function. I'll get that patched up and it'll be out in the next update. Just for my own clarity, your call to SendModRPCToServer is in modmain.lua correct? Link to comment https://forums.kleientertainment.com/forums/topic/53596-how-to-send-extra-args-with-sendmodrpctoserver/#findComment-635104 Share on other sites More sharing options...
DarkXero Posted May 6, 2015 Share Posted May 6, 2015 @PeterA, I replicated the issue.Yes, in modutil the SendModRPCToServer is missing the ... after the comma. In the meantime you can use the GLOBAL.SendModRPCToServer, @DJPaul. Link to comment https://forums.kleientertainment.com/forums/topic/53596-how-to-send-extra-args-with-sendmodrpctoserver/#findComment-635105 Share on other sites More sharing options...
Developer PeterA Posted May 6, 2015 Developer Share Posted May 6, 2015 Yes, in modutil the SendModRPCToServer is missing the ... after the comma. Yup, I've patched it here. Thanks for replicating the issue DarkXero! Link to comment https://forums.kleientertainment.com/forums/topic/53596-how-to-send-extra-args-with-sendmodrpctoserver/#findComment-635108 Share on other sites More sharing options...
DJPaul Posted May 7, 2015 Author Share Posted May 7, 2015 Yay! Big thanks @PeterA and @DarkXero for looking into this, fixing the bug, and providing an interim workaround. And, for the record: your call to SendModRPCToServer is in modmain.lua correct? Yes. Link to comment https://forums.kleientertainment.com/forums/topic/53596-how-to-send-extra-args-with-sendmodrpctoserver/#findComment-635316 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now