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 / User Defined Array (help needed)

Author
Message
Lucid
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location:
Posted: 26th Sep 2004 20:28
OK so basically I am having trouble saving an array wich has the user defined TYPE. Any help would be greatly appreciated. Check out the code as I pasted it...it's working but it's before I apply the user defined types. Here is an example of how I had the code (that didnt work):

TYPE Charsetup
Name AS STRING
Class AS STRING
Age AS INTEGER
ENDTYPE


savearray:

DIM Chars(2) AS Charsetup

filename$ = "chararray.dat"

Chars(1).Name="Taemon Waters"
Chars(1).Class="Shaman"
Chars(1).Age=22


TEXT 222,222, " Saving array..."
WAIT 1500
SAVE ARRAY filename$,Chars(2):CLS
GOSUB Larray

Larray:

LOAD ARRAY filename$,Chars(2)

TEXT 222,200, Chars(1).Name
TEXT 222,222, Chars(1).Class
PRINT Chars(1).Age
WAIT 2500
END

"The secret to creativity is knowing how to hide your sources"
-Albert Einstein
Dodo
20
Years of Service
User Offline
Joined: 8th Aug 2004
Location: eating lunch
Posted: 27th Sep 2004 02:48
for some unknown reason DBPro is unable to save user defined type arrays. for more help check out this thread


Thanks to Ilya for the Logo!
Lucid
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location:
Posted: 27th Sep 2004 09:40
oh...=(

Thanks for the info!

"The secret to creativity is knowing how to hide your sources"
-Albert Einstein

Login to post a reply

Server time is: 2024-11-27 10:35:11
Your offset time is: 2024-11-27 10:35:11