-Solved-

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

-Solved-

Post by coolboy714cp »

-Solved-
Last edited by coolboy714cp on 21 Jul 2011, 22:34, edited 1 time in total.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

hi. In what line does the error happen? You can find it by adding a trace(number) in each line - the number starts from 0 and increases by 1 each line - and then check in which line it stops tracing. The error reports that you are trying to set something on a null object.

Maybe its because you do an if(cmd == "getInventory") inside the switch statement, which is not needed, and also because you only instantiate the returnData object inside the if statement. So i suggest you to instantiate the returnData object before the switch.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Post by BigFIsh »

You need to perform a check for the size of rows returned:

dbQuery.size() > 0

Otherwise, you'll get that error when you attempt to fetch the first row when it doesn't exist.
Smartfox's forum is my daily newspaper.
Post Reply