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 / Create an array based upon a text file

Author
Message
Max Tillberg
18
Years of Service
User Offline
Joined: 16th Jul 2005
Location:
Posted: 6th Apr 2018 10:20
I would like to create a an array baesd upon the data in a textfile. Right now I know the legth of the file (NoOfGridPoints) but in the future this is not the case and I would therefore like the array to be expanded depending on the length of the textfile. Any idwas how to do that? I also have an other problem, preferable I would like to read a number of textfiles into an multidimensional array but the textfiles has different lengths, can the multidimensional array have different lengths?
Sincerely,
Max Tillberg
puzzler2018
User Banned
Posted: 6th Apr 2018 11:27 Edited at: 6th Apr 2018 11:36
Is this ok for you

Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 6th Apr 2018 13:49
I'd just use the built in json functions. Scroll to the json section at the bottom

https://www.appgamekit.com/documentation/guides/12_array_changes.htm
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.

Login to post a reply

Server time is: 2024-04-19 12:42:16
Your offset time is: 2024-04-19 12:42:16