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 / Read a text line by line

Author
Message
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 16th Jan 2018 08:36 Edited at: 16th Jan 2018 08:56
Hi

Do you know how I can read a text line by line, like Readline() but with a text$ ?

Exemple of text I would like to read line by line :


Here is my technic :




2) using the array NewText$[] as you want
So, to read it :



3) After using the array NewText$[], don't forget to undim it with



Do you know another way to do that or it's a good method for you ?

Thank you.
AGK2 tier1 - http://www.dracaena-studio.com
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 16th Jan 2018 09:12
Why dont you just split the text (TempoInfo$) by a delimiter (Chr(10)) using the command:

get the number of lines with the
command.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Jan 2018 09:16 Edited at: 16th Jan 2018 09:16
GetStringToken()

<EDIT> Mobiius answered with more detail
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Blendman
10
Years of Service
User Offline
Joined: 17th Feb 2014
Location: Arkeos
Posted: 16th Jan 2018 09:50
Ah thanks, you're right, I should have thought about CountStringTokens() and GetStringToken() !
Thnaks again.
AGK2 tier1 - http://www.dracaena-studio.com
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 16th Jan 2018 10:14

Login to post a reply

Server time is: 2024-11-27 21:22:05
Your offset time is: 2024-11-27 21:22:05