Closed marshal64 closed 11 years ago
Hi, could you confirm it with the new release of Cumulus?
I now testing the script: function onConnection(client,...) function client:relay(targetId,...) target = cumulus.clients(targetId) if not target then error("client '"..targetId.."' not found") return end target.writer:writeAMFMessage("onRelay",self.id,unpack(arg)) target.writer:flush(true) end end
Not works... On the line "target.writer:writeAMFMessage("onRelay",self.id,unpack(arg))" error is given: "bad argument #1 to 'unpack' (table expected, got nil)"
And immediately there was a new question: how to check the validity of the key on server in onConnection function?
Try in replacing "unpack(arg)" by "unpack({...})" and tell me...
You can test variable with a simple "print", or in using log (NOTE, INFO, etc... see "Server Application" wiki page)
Ok, you are right I think, it was a problem with "depreciated keyword arg" since LUA 5.1... Use directly it instead of: target.writer:writeAMFMessage("onRelay",self.id,...)
More light, more clean, and works :-) I have fixed documentation about it everywhere, thanks
All works! Thanks.
Point "Why the cirrus sample doesn't work?" in the FAQ stopped working. Apparently, this is due to changes in the RPC after April.