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 / Declaring an array in a user defined type

Author
Message
SJPro
23
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 25th Jun 2011 03:00
From this thread I'm guessing it is a no?

http://forum.thegamecreators.com/?m=forum_view&t=169013&b=1

It's a year old and I'm hoping things might have changed since then.

www.freewarehub.net
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Jun 2011 03:36
This is still the case, you can not declare arrays within UDTs
Try to compile this:

You will get the error "Cannot declare an array within a type a line whatever". So if you want/need arrays in types you will probably have to look at DarkGDK and learn c++.

A clever person solves a problem, a wise person avoids it - Albert Einstein
SJPro
23
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 25th Jun 2011 03:52
Thought so. Thanks for the quick reply and clarification.

www.freewarehub.net
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Jun 2011 04:02
Quote: "Thought so. Thanks for the quick reply and clarification."

You're welcome, it is one of the few things that lets DBPro down and means the developer has to create their own work around. I think TGC is going to make declaring arrays within UDTs possible in AppGameKit though.

A clever person solves a problem, a wise person avoids it - Albert Einstein
SJPro
23
Years of Service
User Offline
Joined: 3rd Jul 2003
Location:
Posted: 25th Jun 2011 04:07
Fingers crossed. It would be nice to see it added to a future update to DBPro as well.

www.freewarehub.net

Login to post a reply

Server time is: 2026-07-10 15:30:58
Your offset time is: 2026-07-10 15:30:58