SUB TD_SAVEFILE(...)

Good morning, I tried to use this subroutine and I found the following error:

Cannot reference a freed object ID [-11221]
occurred at line 1241 in tc_event

May anybody help, please?

Regards,
david

Comments

ERROR NUMBERS

hello David,

The manual has all the error numbers in Appendix B, but frankly the explanations are a little vague. If you don't already have the manual, it can be downloaded as a pdf file on the Downloads Page.

Regards,
Mike C.

SUB TD_SaveFile(extension$,filename$)

hello David,

I do not know what all is in your code, but basically the use of the "TD_SaveFile(extension$,filename$)" is demonstrated by the following short program. The SUB only makes the "Save dialog box" pop up, and you have to supply the code for the actual saving. You may already know this much.

Perhaps if you list your program we could maybe see what the problem is.

! ---------------------------------
option nolet

LIBRARY "Truedial.trc"

LET extension$=""
LET filename$="SuggestedFileName.txt" ! this name will appear as the "suggested file name"

set cursor 3,1
sound 700,.16
print, "... Now going to CALL SUB ""TD_SaveFile(extension$,filename$)"": (press any key to proceed)"
get key zz

CALL TD_SaveFile(extension$,filename$)

b$=" now at this point in the program you would have to have added the code which actually saves the file..."
sound 900, .18
print
print, b$
get key zz

END
! ----------------------------------

Hope this helps.

Regards,
Mike C.

Hello, Thank you very much

Hello,

Thank you very much for your help. Indeed I am ashamed because the error did not deal with Td_save file() but with a command I had before ("CALL tc_cleanup"). When I deleted this command the problem was solved.
In the past TB had a list of the error codes, with explanations. I think this does not occurr now. The message was not clear for me and I expoded it in a wrong way.
Regards,
david