Page 1 of 1

onPrivateMessage Documentation

Posted: 30 Jul 2008, 15:09
by duncanhall
The documentation for the 'onPrivateMessage' method states that four parameters are received as:

Code: Select all

message:String, sender:User, roomId:Number, userId:Number
However, after bashing my head and digging around in the code for a while, I found the actualy implementation of this method:

Code: Select all

scope.onPrivateMessage(textMsg.toString(), scope.roomList[fromRoom].userList[usrId], usrId, fromRoom)
The last two parameters should be swapped around in the documetnation.

Re: onPrivateMessage Documentation

Posted: 12 Nov 2008, 08:56
by foyb2
duncanhall wrote:The documentation for the 'onPrivateMessage' method states that four parameters are received as:

Code: Select all

message:String, sender:User, roomId:Number, userId:Number
However, after bashing my head and digging around in the code for a while, I found the actualy implementation of this method:

Code: Select all

scope.onPrivateMessage(textMsg.toString(), scope.roomList[fromRoom].userList[usrId], usrId, fromRoom)
The last two parameters should be swapped around in the documetnation.
hi,

had the same problem here. PLEASE update your documentation, i use the AS2 API ...

Posted: 06 Apr 2009, 14:43
by Kenn
Seeing how this post is few months old ill stress this issue again, please do look over the docs!

roomId traces userId, and the other way around. This is very confusing..