Me again. Ive just finished writing a simple program using a model off the cd where it turns and makes a bang noise (supposedly- it doesnt work yet) but when i try to run it, all it says is 'not enough parameters'
1: what do i have to do/ wat dus it mean,
2: what's the key number for spacebar?
1. we need more info. What command are we talking about, how does the code look like where the error is and so on.
2. in the help section of your IDE under Command Reference there is a section called Scancodes Picker where you can get the codes for all the keys. Space is 57.
it doesn't say where the error is, the error screen just pops up when i clik on run.
If it helps, heres the code:
------------------------------------
Graphics3D 800,600
SetBuffer BackBuffer()
camera=CreateCamera()
CameraViewport camera,0,0,800,600
light=CreateLight()
ROCKET1=LoadSound("ROCKET1.wav")
btadpole=LoadMesh("btadpole.3ds")
PositionEntity btadpole,0,-200,1500
While Not KeyHit(1)
If KeyDown (203) Then
TurnEntity btadpole,0,0,1,0
EndIf
If KeyDown (205) Then
TurnEntity btadpole,0,0,-1,0
EndIf
If KeyHit (57) Then
PlaySound ROCKET1
EndIf
UpdateWorld
RenderWorld
Text 320,500, "Yay!"
Flip
Wend
End
1. In debug mode,Look at the line that is hilighted in the debug window when you get the error, then goto the error in your code and press F1 twice, this will show the manual entry for that command, now you can see what you done wrong.
2. There is a scancode picker, click the little house on the tool bar, and then click "Command Reference" followed by "Scancodes Picker"
Hope that helps!
The Error is with your EmitSound command, but as you dont seem to have set up a listener, I assume you should use the playsound command instead.
playsound sound
k thanks il just fix it and c if it works in a sec
um na the sound issue is fixed but now it cant find the 'btadpole' mesh entity thingy, yet they are in the same folder! how do i get it to find and load it?
You have Called it "Mesh" with "Mesh = LoadMesh("btadpole.3ds")", so you need to change it to...
btadpole=LoadMesh("btadpole.3ds")
kool! it works but it still have no sound, and the tank is just white
(I updated the post above with the new code)
playsound sound
instead of
playsound ROCKET1
or you could change the loading line...
ROCKET1 = LoadSound("ROCKET1.wav")
add this into your code after ROCKET1=LoadSound("ROCKET1.wav")
If FileType("ROCKET1.wav")=0 Then RuntimeError("file does not exist!")
If ROCKET1 = False Then RuntimeError("Unable to load sound!")
And see what error message you get.
And your tank isn't textured because you havnt done it yet, use the LoadTexture() and EntityTexture() commands.
o well sumhow i fixd it w/o doin all dat so it all good now- whoopee! my 1st working Blitz3d program that i wrote. Thanku!