Search found 44 matches
- Tue Apr 01, 2014 2:12 pm
- Forum: Games
- Topic: Block of code not working
- Replies: 4
- Views: 5116
Re: Block of code not working
Hi Klaus, I have already trawled through the post you linked and it didn't help because the questions I had asked already were looking for what to do . This time I'm looking for why the previous advice I was given hasn't worked. I have the code above so there's nothing being kept back or hidden. I'v...
- Mon Mar 31, 2014 9:10 am
- Forum: Games
- Topic: Block of code not working
- Replies: 4
- Views: 5116
Re: Block of code not working
I have attached screenshots of the program as it is running. The variable "hey" was replaced by "MyVariable" though for some reason hasn't changed. This is only a recent change and is unlikely to be what is effecting the program's output. I have had the same problem since before I changed the name o...
- Mon Mar 31, 2014 9:09 am
- Forum: Games
- Topic: Block of code not working
- Replies: 4
- Views: 5116
Block of code not working
This is the code : on preopencard setup_ open file specialfolderpath("desktop") & "/mydata.txt" for read read from file specialfolderpath("desktop") & "/mydata.txt" until eof put it into tHighscores put tHighscores after fld output close file specialfolderpath("desktop") & "/mydata.txt" sort_ end pr...
- Tue Mar 18, 2014 2:51 pm
- Forum: Games
- Topic: Using data from a Text field
- Replies: 8
- Views: 8997
Re: Using data from a Text field
Thank you! I appreciate the help, this was instrumental in me completing this on time. I've implemented the code and I feel as if it is finished (finally)
! Thanks again,
Nico.

Nico.
- Mon Mar 17, 2014 10:23 am
- Forum: Games
- Topic: Using data from a Text field
- Replies: 8
- Views: 8997
Re: Using data from a Text field
Hi, using the code you recommended I managed to adapt the function to work properly, thank you very much :) Is it possible to use a similar method to split the names from the scores so that I can sort the scores? And will I be able to sort the scores and keep the corresponding names with the scores ...
- Mon Mar 17, 2014 9:51 am
- Forum: Games
- Topic: Using data from a Text field
- Replies: 8
- Views: 8997
Re: Using data from a Text field
Hey Jacque,
I'll try the code you've advised and see if it makes a difference
Will this code allow me to display the Name and score of a user or will it just display the name? ( I also need the data split so that it can be sorted using my adaptation of the normal LiveCode sorting algorithm).
I'll try the code you've advised and see if it makes a difference

Will this code allow me to display the Name and score of a user or will it just display the name? ( I also need the data split so that it can be sorted using my adaptation of the normal LiveCode sorting algorithm).
- Thu Mar 13, 2014 2:47 pm
- Forum: Games
- Topic: Using data from a Text field
- Replies: 8
- Views: 8997
Re: Using data from a Text field
Okay, I've changed the code. It now goes like this (this has been copy & pasted so there's no difference between what I have and what you see) : Global tScores on mouseUp Local tName put empty into fld "output2" put fld "output" into tScores split tScores by LF and TAB ask "Please enter the name you...
- Tue Mar 11, 2014 3:34 pm
- Forum: Games
- Topic: Using data from a Text field
- Replies: 8
- Views: 8997
Using data from a Text field
Hello to all reading this :) Firstly, this will sound stupid because of the nature of the question but trust me; if this was as easy as it should be then I wouldn't be here. Here's the problem: I want to move the data from a text field (an output field used to display text (names) and positive integ...
- Thu Mar 06, 2014 3:19 pm
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
Hey all, Quick update: Using a mixture of your advice and the LiveCode tutorials I have got my program working :D thank you both for your help, you were fantastic. It was only with your help that this was possible and I am eternally grateful. I apologise for being frustrating and unable to follow wh...
- Thu Jan 16, 2014 4:19 pm
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
I realise my actions were inefficient, however I was particularly busy for the large majority of that time. I rarely had a chance to take time out to read these forums, I apologise.
- Fri Jan 03, 2014 4:57 pm
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
Hi Klaus, The Highscore list contains the username and score of every player to have achieved any score at all. The items in the list are stored as " name TAB score CR" so that the list is always kept semi-neat. As for the code you think you've fixed, I have been trying to make sense of your final s...
- Wed Dec 18, 2013 2:49 pm
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
Hi Klaus, After using your code, I get no output whatsoever. I really don't understand what the problem is here. The code you used looks pretty solid and it seems like it should work but nothing is being put in the output fields. I'm sorry for all the time you've taken on this for it to not work, it...
- Mon Dec 16, 2013 10:19 am
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
Hi Klaus, this is my code so far for the Highscores card: Global gScore Global tempx Global datafilename Global gUsername Local Swapper Local tItem Local tHighscores on preopencard repeat with loop = 1 to the number of lines of file specialfolderpath("desktop") & "/mydata.txt" open file url(specialf...
- Tue Dec 10, 2013 4:15 pm
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
Hey, I'm just trying to figure out the code that I would need to do the following: 1) To read the data from the file and put it into a variable 2) To sort the scores in that variable (I have code that does this step efficiently) 3) To display the scores and the corresponding username in an output fi...
- Tue Dec 10, 2013 3:01 pm
- Forum: Games
- Topic: Can't get read/write and sorts to work
- Replies: 18
- Views: 15282
Re: Can't get read/write and sorts to work
Hi Klaus,
I played about with some code by myself and I eventually got the part working that displays the data.
Could you help me with sorting the data from the datafile?
or
Sorting the data when it goes INTO the datafile?
I played about with some code by myself and I eventually got the part working that displays the data.
Could you help me with sorting the data from the datafile?
or
Sorting the data when it goes INTO the datafile?