Im trying to add some value to the handler but i can't seem to get it.
this is its default values
- Code: Select all
connection.addMessageHandler("start", function(m:Message, userid:String, username:String, x:int, y:int)
- Code: Select all
connection.send("start", mouseX, mouseY)
and this is what i did to get that value added
- Code: Select all
connection.addMessageHandler("start", function(m:Message, userid:String, username:String, x:int, y:int, example:String)
- Code: Select all
connection.send("start", mouseX, mouseY, example)
as you can see i added value "example" to the arguements and this is what the error says
ArgumentError: Error #1063: Argument count mismatch on MethodInfo-396(). Expected 6, got 5.
at Function/http://adobe.com/AS3/2006/builtin::apply()
at bridge::Connection/handleMessage()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at bridge.utils::BinarySerializer/onMessage()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at MessageBuilder/AddValue()
at bridge.utils::BinarySerializer/onValue()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at TokenBuilder/AddByte()
at bridge.utils::BinarySerializer/AddByte()
at <anonymous>()
i totally get the idea of expected arguements but am i doing it right? or am i missing something?
P.S.: maybe im posting it in the wrong thread, feel free to move it, thanks