Forum ActionScript 3.0 Reference Error

Problems and discussions relating to ActionScript 3.0 here.

Reference Error

Postby Sam_O » February 14th, 2012, 7:47 am

I'm getting this error after calling a createJoinRoom

ReferenceError: Error #1069: Property playerio:Message::add not found on bridge.Message and there is no default value.
at Function/<anonymous>()

Any idea what it might be?
Sam_O
 
Posts: 22
Joined: June 2nd, 2010, 3:25 am

Re: Reference Error

Postby Benjaminsen » February 14th, 2012, 2:32 pm

Can you post some more code?
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Reference Error

Postby Sam_O » February 14th, 2012, 11:39 pm

I think I pinpointed the error. I usually encrypt my game using secureSwf and I just leave out all the playerIO classes and anything that has to do with it but I was sending a variable using a reference that was encrypted so I think that is the cause of the error. I need to try it out.
Sam_O
 
Posts: 22
Joined: June 2nd, 2010, 3:25 am

Re: Reference Error

Postby Sam_O » February 15th, 2012, 1:04 am

Couldn't solve it :(

The line that is cause it is:

Code: Select all
client.multiplayer.createJoinRoom("$service-room$", "MyCode2", true, {}, {Gender:myGender, AvatarNum:myAvatarNum, Nickname:myNickname, mapType:myMapType}, handleJoin, handleError)


If I leave out the joinData everything works fine, I even tried to put in values manually (ex: Gender:"b") and it still wouldn't work.

Please help!
Sam_O
 
Posts: 22
Joined: June 2nd, 2010, 3:25 am

Re: Reference Error

Postby Sam_O » February 15th, 2012, 6:35 pm

Thanks for chatting with me on Skype Chris about the problem, I'll post here once I try out the things we talked about.
Sam_O
 
Posts: 22
Joined: June 2nd, 2010, 3:25 am

Re: Reference Error

Postby Benjaminsen » February 15th, 2012, 6:39 pm

Sam_O wrote:Thanks for chatting with me on Skype Chris about the problem, I'll post here once I try out the things we talked about.


Evil undercover problem solving ;)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Reference Error

Postby nulllgames » August 26th, 2012, 12:55 pm

Was there a solution to this problem? I'm encountering the exact same thing. Everything works fine until i apply secureSWF - by default i also leave out all player IO stuff, and this has always worked. I have 3 different join rooms in my code and only the one that uses join data bugs out. The problem remains even if i turn off all options in secureSWF. Without secureSWF it works, but i prefer the protection.

I can create a system without the joindata, but it's faster if i can send it along with the initial connection. The joindata is either "1" or "2" (ie strings).

Code: Select all
vrs.NotiClientRef.multiplayer.createJoinRoom(roomID, roomType, true, { }, { vw:"1" }, handleJoinX, handleErrorX);
http://nulll-void.com/games/ - scifi themed flash games
User avatar
nulllgames
 
Posts: 10
Joined: January 25th, 2011, 9:41 pm

Re: Reference Error

Postby Sam_O » August 26th, 2012, 7:41 pm

To fix it I took out the join data.
Sam_O
 
Posts: 22
Joined: June 2nd, 2010, 3:25 am

Re: Reference Error

Postby Sam_O » August 26th, 2012, 7:42 pm

In the future I will be trying to send the join data again but let me know if you find a solution.
Sam_O
 
Posts: 22
Joined: June 2nd, 2010, 3:25 am

Re: Reference Error

Postby nulllgames » August 26th, 2012, 8:13 pm

I ended up taking out the joindata as well. In my case it was only a small adjustment as the joindata was only used to identify a player vs a spectator. Now i just have the server send a request to the player, asking to identify themselves once they're connected.
http://nulll-void.com/games/ - scifi themed flash games
User avatar
nulllgames
 
Posts: 10
Joined: January 25th, 2011, 9:41 pm

Re: Reference Error

Postby Benjaminsen » August 30th, 2012, 9:51 pm

The problem is a result of how the SecureSWF encryption works. The JoinData reference is a weak reference which breaks when the data is obfuscated.

You could possible fix the issue by passing a class instance that inherits a dynamic object which is excluded from the SecureSWF obfuscater, but I have not tested this yet.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to ActionScript 3.0



cron