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 / BUG: Array Type Subscripts referencing in other Arrays

Author
Message
AsylumHunter
16
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: United States
Posted: 7th Oct 2002 13:05
I have an Array 'Actor(n)' with a Type Subscript 'Class' with a further subscript 'ID'.


Everything works perfectly accessing and editing data, except when I try and use the Value stored in Actor(n).Class.ID to extract a string from another array.


For Example:

Instance=3
Actor(Instance).Class.ID=5

This Works Perfectly:

ActorID=Actor(Instance).Class.ID
ActorClassName$=ClassNames$(ActorID)

ActorClassName$ returns the name of the string stored in ClassNames$ referenced by the ActorID

However, This Doesn't work:

ActorClassName$=ClassNames$(Actor(Instance).Class.ID)

This returns a "?" as the string everytime.


- AsylumHunter
still falling out of my binary tree most evenings (hicup!)
Ratty Rat
16
Years of Service
User Offline
Joined: 24th Sep 2002
Location:
Posted: 7th Oct 2002 19:39
I can`t help you with this one except to say there seem to be several issues with types and arrays at the moment, including the built in types, try this:-


It should give the same result for each variable but only the non-arrayed one works.

I found another problems with strings too, they simply do not work with Select...case.

All I can say is look out for patches, the darkbasic team have always been very efficient at fixing problems and I for one am looking forward to the already hinted at Release 2.

Login to post a reply

Server time is: 2019-07-19 09:44:23
Your offset time is: 2019-07-19 09:44:23