We made an all encompassing function to update the movement of the player on the server, we decided to use a string-type extension parameter so that it sends as little information as possible. We also decided not to have the server update the direction the character is facing if that direction hasn't changed or update the position if it is invalid (ie, an obstruction).
So we made an array. We insert the new coordinates if they have changed, in spot 0, we add the new direction coordinates if they have changed in spot 1. Sometimes 0 will be null, sometimes 1 will be null, other times they'll both be filled.
When I send the array with a null value, I get this error:
Code: Select all
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at it.gotoandplay.smartfoxserver::SmartFoxClient/sendXtMessage()[C:\Program Files\SmartFoxServerPRO_1.6.2\Flash API\Actionscript 3.0\it\gotoandplay\smartfoxserver\SmartFoxClient.as:1974]
Code: Select all
hdr += paramObj[i].toString() + MSG_STR