Search found 44 matches

by Nico_C_GHS
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...
by Nico_C_GHS
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...
by Nico_C_GHS
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...
by Nico_C_GHS
Tue Mar 18, 2014 2:51 pm
Forum: Games
Topic: Using data from a Text field
Replies: 8
Views: 9002

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) :D ! Thanks again,
Nico.
by Nico_C_GHS
Mon Mar 17, 2014 10:23 am
Forum: Games
Topic: Using data from a Text field
Replies: 8
Views: 9002

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 ...
by Nico_C_GHS
Mon Mar 17, 2014 9:51 am
Forum: Games
Topic: Using data from a Text field
Replies: 8
Views: 9002

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).
by Nico_C_GHS
Thu Mar 13, 2014 2:47 pm
Forum: Games
Topic: Using data from a Text field
Replies: 8
Views: 9002

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...
by Nico_C_GHS
Tue Mar 11, 2014 3:34 pm
Forum: Games
Topic: Using data from a Text field
Replies: 8
Views: 9002

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...
by Nico_C_GHS
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...
by Nico_C_GHS
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.
by Nico_C_GHS
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...
by Nico_C_GHS
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...
by Nico_C_GHS
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...
by Nico_C_GHS
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...
by Nico_C_GHS
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?