QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: johannhowitzer on January 29, 2021, 07:11:13 am

Title: GET and PUT with TYPE
Post by: johannhowitzer on January 29, 2021, 07:11:13 am
Had to comment out this line in a file save/load routine:

GET #1, , best_score

best_score is of type score_structure, which has two integers, a _byte, and a string.  Is there a way to use GET and PUT with custom data types?
Title: Re: GET and PUT with TYPE
Post by: FellippeHeitor on January 29, 2021, 07:26:44 am
Make the strings fixed-width in your type, like for example:

TYPE mytype
    element AS STRING * 50
END TYPE
Title: Re: GET and PUT with TYPE
Post by: johannhowitzer on January 29, 2021, 07:28:29 am
Ah, error message makes way more sense now, thanks.