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 / Error Message!

Author
Message
Dritt
18
Years of Service
User Offline
Joined: 10th Jan 2006
Location:
Posted: 29th Mar 2008 13:32
Hello.

I get this error when trying to run the program:

Runtime Error 7801 - Vector does not exist at line 124.

I am using this code:

y = camera position y()+10

if keystate(57)
position camera 1,y
endif

if y
position camera 1,y-10
endif


The code in bold are line 124.

Anybody know what the problem may be? Will placing a vector fix it? If so, whats the code for it? Or give me the section in the command index in the help contents if you can.

Thanks
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Mar 2008 14:41
When you use a single value after the camera number in the POSITION CAMERA command, you are instructing DBPro to use the vector version of the command.

What I think you want is:


You'll need to change the other command a few lines earlier in a similar way too - remember, a position has 3 points, not 1

Dritt
18
Years of Service
User Offline
Joined: 10th Jan 2006
Location:
Posted: 29th Mar 2008 15:11
Ok, i see. Now it works, thank you very much for the help ianM I will remember that a position always needs 3 points!

Login to post a reply

Server time is: 2024-11-25 06:24:50
Your offset time is: 2024-11-25 06:24:50