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 / DBP, need advice (on something like arrays)

Author
Message
GoPostal
20
Years of Service
User Offline
Joined: 9th Sep 2004
Location:
Posted: 10th Sep 2004 02:26
I am new to DBP, only just got it and I have no other experience. I was wondering 2 things:

1: Are there constants in DBP, and how do I set them/use them?

2: This is sort of like arrays, but complicated. What I want is a variable, which stores 18 integers, so it is sort of like an array, but not an array. I messed around with the example in the manual, and that just yielded an error when i tried to run the exe.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 10th Sep 2004 02:48
1. Yes

Syntax:

#constant NAME VALUE

eg:

#constant NUM 2

do
print NUM
loop

2. Can you explain a bit more clearly?


BlueGUI:Windows UI Plugin - All the power of the windows interface in your DBPro games.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 10th Sep 2004 03:34
2. You mean user defined types?
eg



it's cool to hate
GoPostal
20
Years of Service
User Offline
Joined: 9th Sep 2004
Location:
Posted: 13th Sep 2004 02:55
Thanks for the help on the first bit Rob, I think what would reall y help is if I could understand arrays, they might be what I want, any good tutorial you could direct me to. The bit in the manual doesn't help me.
GoPostal
20
Years of Service
User Offline
Joined: 9th Sep 2004
Location:
Posted: 14th Sep 2004 05:45
Sorry, I didn't read one of the tutorials. I thought all of them were 404'd. Turns out all I wanted was a 1D array. Sorry
GoPostal
20
Years of Service
User Offline
Joined: 9th Sep 2004
Location:
Posted: 14th Sep 2004 06:34
OK, next question. I am using these arrays to store data. What I am doing is adding an input option. You input which array you want to change the value on, and then which number in it. See the code example. I am wondering if there is another way to do what I want.

The oldvar variable is just to see if it works. I have set it as a number in an array, but it does not access it, because apparently the "addwhat(addtoid)" bit does not work to access it.

Login to post a reply

Server time is: 2024-11-27 08:48:35
Your offset time is: 2024-11-27 08:48:35