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.

Author
Message
adr
23
Years of Service
User Offline
Joined: 21st May 2003
Location: Job Centre
Posted: 13th Aug 2003 20:25
Any plans to allow arrays in UDTs?
I opened the case to my PC today and thought, my exhaust fan sucks.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 14th Aug 2003 04:15
if you are refering to eg: Player(1).HitPoints ,
then thats apart of DBP now and they can be fed into function parameters unlike standard universal data types.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 14th Aug 2003 10:01
He means this:

type MyType
stuff(10) as integer
endtype

Lee did say in one of his diary entries that now he has strings working correctly in types, this could become easier to implement ... no timescales were given though.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 14th Aug 2003 11:22
oh the array up in the type itself thanks mate.

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 23rd Aug 2003 10:50
Hmm... so any bright ideas to simulate something like an array in types? For instance, I had a spaceship type, which I need to keep prerecord the limb number of all the turrets on the shop so that I can manipulate them easily later without having to walk thru the limb list again (waste of time CPU cycle).

I found that it is hard to design my code without array in type for this case.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 23rd Aug 2003 10:53
Oh, BTW, the number of turrets on the ship can be varied. Thus the following doesn't work,

type SpaceShip
turretA as integer,
turretB as integer
turretC as integer
turretD as integer
endtype

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
OSX Using Happy Dude
22
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 23rd Aug 2003 11:41
In that case you could use a linked list.


IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Aug 2003 15:03
Just use a parallel array:

Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 23rd Aug 2003 20:44
Brilliant, IanM! Way to go! It's so simple but I don't know why I didn't think of it. That construct is the closest resembles to what I want as array in a type. Thanks! I love you man!

Still thinking any flaw in this method though....

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/

Login to post a reply

Server time is: 2026-07-23 15:49:22
Your offset time is: 2026-07-23 15:49:22