PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

List problem in last build?

I got a strange load behavior from the last build.

using the following code:
Code:

file$ = AppPath$+"//Saves//"+"status.txt"; //status_list
fp$ = fopen(file$, "r");
string$ = readstring(fp$);
fclose(fp$);
strtolist(string$, ",", Status_List$); //status_list_Cont
foreach(Status_List$)
Status_List$=INT(Status_List$);
end;


Under build 0.9.6 everything goes well, while using the latest version the list loaded from the file seems to miss some elements.

Another problem: I'm using two list "paired" in this way:
list1 contains names, while list2 containes values linked to the names:

list1[0]=John
list2[0]=2

list1[1]=Paul
list2[1]=5

so I'll display: John:1 ; Paul:5

The problem is: the first time I increment a value in list2 all the values from that list increments. i.e.:

list2[0]=list2[0]+1 causes list2[1]=list2[1]+1.

Don't know if this is happening to me only, or if there's something i don't understand about lists.

Waiting some clarance, i'll go back to ver. 0.9.6.

Bye, Solonn
There was a bug in the list optimization code I have implemented in 0.9.7. Lists are not working correctly in this version.

I will try your codes and see if they behave normally in the latest version I am working on.
Yep, your codes worked fine with version 1.0.

I have fixed a few little bugs with the readstring() function. It now reads the correct number of bytes for each line.
Thanks! Good news!

On a side note: since I'm gonna publish the first "alpha" of my program within the week (at least i do hope so), I would be glad to use this ppl forum as a support.
The program I'm working on will be handful to people playing RPGs (Role Playing Games), and will be freeware, but should also be useful to demonstrate some features of ppl.

Bye, Solonn
PointOfLight · 09 May 2006, 21:30 UTC
You've got me interested. I have some experience building PC software for generating RPG character sheets, so I like playing around with other people's RPG aids. Can you give us a little more info on what your program is going to do?
To PointOfLight:

The program is being developed as a digital aid for an RPG I'm creating with some friends; Basically it will keep track of various aspects of the game: Life, mana and stamina levels; the status of body parts (fine, injuried, badly injuried ecc..); the contents of the backpack; the actual statistics etcetera.

The main idea is to use a single digital support instead of various paper sheets; this digital support should be cross-platform, increasing portability (PPL here Rulez!). This way not only the player, but also the Master would have a way to play smoothly without being overwelmed by sheets. Another Feature I'd like to implement is a way to connect various client of my program, so every member of the "Party" could keep track of the stats of other ones. Regarding this last point I'll probably use the connection over tcp/ip implemented in PPL, but this will not be in the immediate future.

As for now, the main structure of the program is ready, so I intend to release the "alpha" to have some feedback; if you are interested keep an eye on this forum, since I will announce here the release.

Bye, Solonn.