ack, a bug already?

Blitz3D Forums/Blitz3D Beginners Area/ack, a bug already?

chwaga(Posted 2007) [#1]
I've run into 2 bugs in my code, it says i can't set the graphics mode to "Graphics3D 1024,1280,32,1"

also, it says my entity doesnt exhist...which is clearly does. here's my code:

Graphics3D 640,480
SetBuffer BackBuffer()

camera=CreateCamera()
PositionEntity camera, EntityX(campiv),EntityY(campiv),EntityZ(campiv)-10

light=CreateLight()


;-------------------------------------------

test=CreateCube()
PositionEntity test, 0,0,0

campiv=CreatePivot()
PositionEntity campiv,0,10,0

While Not KeyDown(1)

RenderWorld
Flip

Wend

End


GfK(Posted 2007) [#2]
Try 1280x1024 ;)

Also, CreateCube(), not CreateCube.

Rule of thumb: Anything function thats returning a value, whether its an Int, String, entity handle, or whatever, must be called with parentheses, even if no parameters are being passed. Otherwise it'll just return 0.


Who was John Galt?(Posted 2007) [#3]
...and you never create an entity called 'pivot' which you refer to


chwaga(Posted 2007) [#4]
I just noticed the pivot problem, I added the "()" and fixed the name problem...updating code now

(i discovored that the problem in the graphics is the "32,1" which doesnt make much sense, cause i've used that before and it still worked perfectly)
(still doesnt work)


GfK(Posted 2007) [#5]
^^and that!


chwaga(Posted 2007) [#6]
I'm not sure if the "entityz(campiv)-10" works even IF i get past this bug, any help on that is appreciated too.

(havent coded in over a month, im kinda foggy)


big10p(Posted 2007) [#7]
Create campiv before referring to it with EntityX/Y/Z.


chwaga(Posted 2007) [#8]
doh! forgot about that. That should do it...implimenting it now


chwaga(Posted 2007) [#9]
and there we go, thanks a lot :D