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.

DarkBASIC Professional Discussion / Array inside of a type

Author
Message
Scab
22
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 21st Dec 2011 08:02
Is it possible to declare an array inside of a custom type?

I am creating a dice game and the DieType is a custom type with 6 Actions that are strings.

This is what I want to do but it doesn't work:

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 21st Dec 2011 10:23 Edited at: 21st Dec 2011 10:24
Just create a stand alone, multi-dimensional array in paralell to your type. This is the official workaround, because of which Lee Bamber don't bother with building this feature.

-In.Dev.X: A unique heavy story based shoot'em ~35%
-CoreFleet: An underground commander unit based RTS ~15%
-TailsVSEggman: An Sonic themed RTS under development for idea presentation to Sega ~15%
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Dec 2011 17:13 Edited at: 21st Dec 2011 17:14


Scab
22
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 21st Dec 2011 19:02
Thanks guys.

That worked - creating a separate sort of look-up array of type action.

Still would be nice if you could have an array as part of a custom type - less messy.
BatVink
Moderator
23
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 22nd Dec 2011 12:25
This feature is coming to AppGameKit in the next release

Login to post a reply

Server time is: 2026-07-11 12:01:24
Your offset time is: 2026-07-11 12:01:24