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 / Array Problem

Author
Message
demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 29th Dec 2004 21:56
I have the X,Y and Z positions of an object stored like this:

but when I change them to arrays as below it doesn't work:


I have declared the array at the top using


I have replaced all the instances of Thug1X#, Thug1Z# and Thug1Y# in the program, but whenever I do this, the thug just freezes when he turns round and doewsn't walk any further.

Can someone help please

Am I the only one here who's really confused?
wmf
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location:
Posted: 29th Dec 2004 22:56
your working with real numbers but you Dim ThugPos(4,3) as integer. try Dim ThugPos(4,3) as float or double float or Dim ThugPos#(4,3) and then change your code to include the # sign. may help with your problem
demons breath
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 29th Dec 2004 22:58 Edited at: 30th Dec 2004 00:00
thanks. I'll give that a try.


[edit]Yay! It works! Thanks a lot - I didn't know that variables were automatically integers. I used the dim ThugPos#(4,3) method.[/edit]

Am I the only one here who's really confused?
http://db1games.topcities.com
http://demonsbreath.topcities.com

Login to post a reply

Server time is: 2024-09-23 08:27:49
Your offset time is: 2024-09-23 08:27:49