Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411572 Posts in 69386 Topics- by 58444 Members - Latest Member: darkcitien

May 04, 2024, 10:23:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperPlaytesting[WIP] Blip (error fixed, thanks guys!)
Pages: 1 [2]
Print
Author Topic: [WIP] Blip (error fixed, thanks guys!)  (Read 3452 times)
Noyb
Level 9
****



View Profile WWW
« Reply #20 on: September 05, 2010, 10:06:41 PM »

The debug player allows a developer to see error messages in compiled swf files, so it's very likely that this error is occurring for every user. Only those with the debug player can see it. The flixel forums consist of a lot of Flash developers, many of whom would have the debug player installed. It's in your best interests to download the debug player yourself to track down the bug.

In English, the error is
Code:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at TutorialBlipping/deathShake()
at org.flixelPP::FlxUPP$/overlapPP()
at org.flixelPP::FlxUPP$/overlapPP()
at TutorialBlipping/update()
at org.flixel::FlxGame/update()

This error display is what's known as a stack trace. When the program has an error, it displays what method it is currently trying to run and the sequence of calling methods all the way back to the update method. So the error is in the deathShake() method of a TutorialBlipping object, which was called by the overlapPP method, etc.

The actual error means that something in the deathShake() method is null when the code expects it to be set to an actual object. For instance, calling either
Code:
public function functionA():void
{
   var a:FlxSprite = null;
   a.x = 3;
}

or
Code:
public function functionB():void
{
   var b:FlxSprite = null;
   a.update()
}
would display that null object error, since a and b do not point to an actual FlxSprite instance, but the code tries setting its x-position anyway. To debug this, you'll want to take a look at what you're doing in the deathShake() method. Somewhere in there you're trying to evaluate a member variable (case A above) or call a function (case B above) on a null object. If you have any hunches, you can test them by using debug statements (that you would later delete), like
Code:
function myFunction(argument:uint):void
{
   if(argument == null)
   {
      FlxG.log("argument is null");
   }

   //Rest of method body

}

There might not even be anything expressly wrong with the deathShake method, but you might be passing in null or uninitialized parameters to it somewhere in the update() method or in those custom collision methods. Hope this helps!  Smiley
« Last Edit: September 05, 2010, 10:15:52 PM by Noyb » Logged

xhunterko
Level 2
**



View Profile
« Reply #21 on: September 05, 2010, 11:55:03 PM »

Thanks! I'll be sure and check that out. I'll hopefully find a fix soon for it. Just to ask something though. The game doesn't freeze or anything does it during the error?
Logged

TobiasW
Level 8
***


This can only end brilliantly!


View Profile WWW
« Reply #22 on: September 06, 2010, 04:01:02 AM »

The game doesn't freeze or anything does it during the error?
It's hard to say, because every error freezes a flash app when you have the Debug player. If you develop flash games, you're highly encouraged to download it too: http://www.adobe.com/support/flashplayer/downloads.html

This way you can experience it too.
Logged

xhunterko
Level 2
**



View Profile
« Reply #23 on: September 06, 2010, 09:23:00 AM »

This should fix it.

http://www.swfcabin.com/open/1283791027

Let me know if that solved the problem. And Noyb, you were while it didn't have anything to do with that type of code, I did figure it out based on that example. Thanks!
Logged

mikewest
Level 0
***


View Profile WWW
« Reply #24 on: September 06, 2010, 10:31:42 AM »

I had no freezing errors.

The one bug (?) I noticed was that when you press c, your circle switches to a smaller size after a few moments.  Did you intend for that?  I was expecting the circle to go away after a certain amount of time (or after pressing c again).

I thought it was a cool concept, and that everything felt more-or-less right (with the change Ataraxic recommended).

I don't want to overstep any boundaries here, but what is the exact mechanic behind the seeing what's not there with the black/yellow circle?  I think it would be cool if the circle showed you another view of the world at the cost of losing what you can see without the circle.  So in the trap room, you can see the two hidden traps within the black circle, but none of the other traps are visible within the black circle.  Pressing c would then essentially let you toggle between two "layers" of the world.  As the prototype stands, I was just left wondering what exactly "seeing more" did.  But that's just my thought/question, feel free to ignore it.

In any case, keep going! It looks like it'll be quite fun.
Logged
RichMakeGame!
Level 3
***



View Profile WWW
« Reply #25 on: September 06, 2010, 10:39:45 AM »

agree with above suggestion

if I can suggest something to help players understand the mechanic on the 'press c' screen
I there should be one of those hidden traps made visible if the player presses 'c' right at the start position. one high above them or something, so they instantly see the idea

-OR- to make it less frustrating, make it blocks in their way, rather than instakill items. then make the next screen with instakills, and the player will understand they hit something invisible
Logged

Bootleg TurboDrive
http://forums.tigsource.com/index.php?topic=30133
testers welcome: will do playtest swap if you need yours tested, PM
www.richmakegame.com
xhunterko
Level 2
**



View Profile
« Reply #26 on: September 06, 2010, 11:27:10 AM »

@Mikewest: I like that idea. I'll consider it. And yes, it's supposed to get smaller after a short amount of time. Eventually, I've thought of adding energy bar(s) per ability. If I happen to use that case.

@redprodukt: I was thinking of that actually. Or something similar to it. Perhaps have a part of the map blocked off with only two traps to interact with. While on the top, have visible, and on the bottom, have hidden traps. Then just for kicks have a fake tileblock in there somewhere so the player falls to their death to keep them on their toes.

I'm glad I got that error taken care of though. I'll be looking forward to hearing more feedback. Smiley
Logged

Pages: 1 [2]
Print
Jump to:  

Theme orange-lt created by panic