Help!

Blitz3D Forums/Blitz3D Beginners Area/Help!

Blitz3dCoder(Posted 2007) [#1]
what is wrong with this code, it keeps saying "ILLEGAL MEMORY ADDRESS"
AppTitle "Outcast Demo"
Graphics3D 1024,768
SetBuffer BackBuffer()






;Collision vars
Player=1
Obstacle=2
;-----------------

;Cameras
cam1=CreateCamera()
PositionEntity cam1,80,6,-232
EntityType cam1, Player


;Lights
lite1=CreateLight()


;Sky
Sky=CreateSphere(60)
Sky_Tex=LoadTexture ( "sky1.bmp" )
FlipMesh Sky
ScaleEntity Sky,700,700,700
PositionEntity Sky, 0,70,0
EntityTexture Sky,Sky_Tex

;Water
ScaleTexture water_tex,6,6
water=CreatePlane()
Water_Tex=LoadTexture( "water1.bmp" )
EntityTexture water,Water_Tex
PositionEntity water,0,3,0
EntityAlpha water,.5
ScaleEntity water,5,100,5

;Terrain
terrain=LoadTerrain ( "HMAP.jpg" )
ScaleEntity terrain,5,100,5
PositionEntity terrain,-758,-21.7,-500
Ground_Tex=LoadTexture ("Grass1.bmp")
EntityTexture terrain,Ground_Tex 
EntityType terrain,Obstacle


;Sprites
	
	;GrassTuft
	GrassTuft=LoadSprite( "Gsprite1.bmp",7 )
	PositionEntity GrassTuft,12,5.5,-122
	SpriteViewMode GrassTuft,3
	
;3d content


	
	
	




While Not KeyDown(1)

;jump space
If KeyHit( 16 )=True Then MoveEntity cam1,0,0,9




If KeyDown( 203 )=True Then TurnEntity cam1,0,1,0
If KeyDown( 205 )=True Then TurnEntity cam1,0,-1,0
If KeyDown( 200 )=True Then MoveEntity cam1,0,0,.08
If KeyDown( 208 )=True Then MoveEntity cam1,0,0,-.08
;strafe left x
If KeyDown( 44 )=True Then MoveEntity cam1,-.5,0,0
;strafe
If KeyDown( 45 )=True Then MoveEntity cam1,.5,0,0



TranslateEntity cam1, 0,-0.2,0




Collisions Player,Obstacle,2,2
Collisions Obstacle,Player,2,2





UpdateWorld




RenderWorld
Text 50,50,"Your Location: x= "+EntityX(cam1)+" y= "+EntityY(cam1)+" z= "+EntityZ(cam1) 



Flip
Wend

End 



Jerome Squalor(Posted 2007) [#2]
put ScaleTexture water_tex,6,6 after water_Tex=LoadTexture( "water1.bmp" ).
im pretty sure this is it.


Blitz3dCoder(Posted 2007) [#3]
Thnx, and about the bunny, sorry dude, no can do.


chwaga(Posted 2007) [#4]
Yeah, that one'll catch you...kinda like the backslash for type fields...


Blitz3dCoder(Posted 2007) [#5]
Did you see the stupid thing I put in the Blitz showcase?