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 / So there's no readByte command?

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Apr 2013 07:41
Well, this is rather annoying. What should have only taken me a few minutes to write my load map function may now not even be possible without completely reformatting the map format I've been using across multiple languages.

"You're all wrong. You're all idiots." ~Fluffy Rabbit
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Apr 2013 08:29 Edited at: 19th Apr 2013 08:31
Here's my solution, which is basically like reading a file into a memblock in DBP.




"You're all wrong. You're all idiots." ~Fluffy Rabbit
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 19th Apr 2013 08:38 Edited at: 19th Apr 2013 08:39
Actually, there is a ReadByte command. You can find information on it by navigating within AppGameKit to Help -> Help -> Commands -> File -> Read -> ReadByte.

here's what it says:

ReadByte

Description
Reads a 1 byte unsigned integer (0-255) from the given file, which must have been opened for reading.

Definition
integer ReadByte( iFileID )

Parameters
iFileID - The ID of the file to read.


I'm using it to load an ascii-map and read it's content like a string like this:

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Apr 2013 09:32 Edited at: 19th Apr 2013 09:33
I don't know what version of AppGameKit you have, but that command is not listed in the help file. Believe me, I do check help files before asking silly questions. Nor does the compiler detect the command.



"You're all wrong. You're all idiots." ~Fluffy Rabbit

Attachments

Login to view attachments
Zwarteziel
13
Years of Service
User Offline
Joined: 22nd Jan 2011
Location: Netherlands
Posted: 19th Apr 2013 09:57 Edited at: 19th Apr 2013 11:09
Ah, I see.. I guess you might be using version 1.076, right? I'm using the latest beta-version of AppGameKit, which is currently 1.08.11. You can download it from your account if you look under 'my products'. (Sorry if this comes over as condescending.. Just trying to help )

Login to post a reply

Server time is: 2024-05-02 14:24:13
Your offset time is: 2024-05-02 14:24:13