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.

AppGameKit Classic Chat / opentoread custom file??

Author
Message
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 9th Feb 2012 07:44
eek

When I test the opentowrite command then make a file





the file is unreadable;

Is there no way to make a custom text file, in text, -with a text editor and have AppGameKit read it?

the text file would be something like

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 9th Feb 2012 07:50
You could use the WriteString() command. e.g



ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 9th Feb 2012 07:53
tks, that will help!
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 10th Feb 2012 10:18
Does anyone know the ascii code for the spacers in the resulting text files created by the OpenToWrite command?

In my text editor they show up as squares

If I try to paste them into the AGKide they don't show up at all.
I can't even paste them in google.

I want to create a custom file to read from dark basic.
bitJericho
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 10th Feb 2012 11:55
IceRGB, I don't know offhand, I would use a hex editor to find out.

ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 10th Feb 2012 14:57 Edited at: 10th Feb 2012 14:59
I did!

About 2 hours ago!


and the answer is...


scroll down





















scroll down
































ZERO!!
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 10th Feb 2012 17:29
When using WriteLine() the lines are terminated with a new line character, ascii code 10, or 0A in hex. They can't be inserted into a string in tier 1 directly but you can use "A"+chr(10)+"B" to insert a newline in the IDE.

WriteInt(), WriteString(), and WriteFloat() use a binary format that should only be read back with ReadInt(), ReadString(), and ReadFloat() respectively.
ICERGB
22
Years of Service
User Offline
Joined: 8th Nov 2002
Location: Canada
Posted: 10th Feb 2012 17:39
yeah I know theres a chr in there somewhere

Login to post a reply

Server time is: 2024-11-23 01:26:20
Your offset time is: 2024-11-23 01:26:20