Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / DB Pro included FPS tutorial code error, but what is the fix?

Author
Message
Broken Attitude
16
Years of Service
User Offline
Joined: 24th May 2008
Location:
Posted: 24th May 2008 09:32
In the FPS tutorial in the Help menu, I went through the tutorial and went line for line. When I go to compile, I get an error in line 96. The code is as follows:

if wrapvalue(camera angle x(0))>40 and wrapvalue(camera angle x(0))180 then xrotate camera 0,40

Can anyone tell me what's wrong with this code? I'm told that "the function call wrapvalue expects parameters in brackets in line 96"
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th May 2008 10:35
Try to work out what the line is trying to do, and look for the missing part of it - debugging is a large part of programming, so you should use this as practice

Alternatively, here's the fixed line:


Broken Attitude
16
Years of Service
User Offline
Joined: 24th May 2008
Location:
Posted: 24th May 2008 14:39
thanks =)

oddly I cannot get the game loaded now. in step debugger, its stuck on gosub_control_player and not moving. black screen, not loading. hmm

Login to post a reply

Server time is: 2024-09-27 14:22:26
Your offset time is: 2024-09-27 14:22:26