Null object updateworld()?

BlitzMax Modules Forums/MiniB3D/Null object updateworld()?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Here is the exact error: Unhandled Exception:Attempt to access field or method of Null object

theres way to much code to post (im converting one of my b3d programs) unfortunately im getting the problem on updateworld. It runs fine without it (except for the collisions & anim of course).

Heres the collisions:

Function init_collisiondata()
	ClearCollisions
	Collisions C_BULLET,C_ship,2,1
	Collisions C_BULLET,C_LEVEL,2,1
	Collisions C_BULLET,C_WATER,2,1
	Collisions C_BULLET,C_MONSTER,1,1
	Collisions C_MONSTER,C_MONSTER,1,2
	Collisions C_MONSTER,C_PLAYER,1,2
	Collisions C_MONSTER,C_SHIP,2,2
	Collisions C_MONSTER,C_LEVEL,2,2
	
	Collisions C_PLAYER,C_PLAYER,1,2
	Collisions C_PLAYER,C_SHIP,2,2
	Collisions C_PLAYER,C_LEVEL,2,2
	Collisions C_PLAYER,C_MONSTER,1,2
	Collisions c_ship,c_ship,2,2
	Collisions C_shadow,C_LEVEL,2,1
	Collisions C_BONUS,C_LEVEL,2,1
	Collisions C_SHIP,C_LEVEL,2,1
	Collisions C_Collector,C_Bonus,1,1
End Function

Main loop:
		Repeat

			'Frame counter
			framecounter=framecounter+1
			If MilliSecs() => basetime+1000
				basetime=MilliSecs()
				FPS=framecounter
				framecounter=0
			EndIf 	
			spritetext(0,50,"FPS "+fps,P.camera,1)
	
			'sound buffers
			If sndbuffer_explosion>0 sndbuffer_explosion=sndbuffer_explosion-1


			'game updates	
			limitfps()
			UpdateEmitters()
			UpdateParticles()
			If endlevel=0 UpdatePlayers()
			Update_bonuses()
			Updatemonsters(level,p.pivot)
			UpdateFlares(p.camera)
			Updatebullets(p.camera)
			updateripples()
			updateexplosion()
			
			If endlevel=0 updateship()
			updatemagnetring()
			updatebloodbomb()
			If endlevel=-1 updategameover(p.camera)
			If endlevel=1 updatelevelcomplete(p.camera)

			updateredout()
					
			UpdateWorld
			
			dl_update()

			updateradar(p.pivot)


			updatehud(p1lives,p1score,p:player)
			updatewaterfog(p.camera,p.underwatersprite)
			
			PositionEntity sky,p.x,p.y-100,p.z
			Updatelensflare(p.camera)
			Updatecubemaps(p.camera)
			RenderWorld 
			
			updatespritetext()
				
			'Text 0,0,"SCORE="+Str(score)+" p1p.lives="+Str(p1p.lives)+" Pacfuel="+Str(p.pakfuel)+" Shipfuel="+Str(p.shipfuel)
			Flip 
					

		Until  endlevel>9 Or KeyDown(KEY_ESCAPE)




Ive no idea what could be causing it.