Hi.
I see you are going to have fun with LiveCode. Good. A couple of observations:
It is easy to think that with LiveCode if you write a reasonable English sentence LC will make sense of it. This is a tribute to how English-Like the language is. But it is still a language, with rules of syntax that must be observed. So this:
Code: Select all
add 1 to counter
put counter line of random_list_num Into generate_number
comes out as:
Code: Select all
put 1 line of random_list_num Into generate_number
Besides being unable to compile, did you mean one line? Did you mean line 1? But you tried and that is worthwhile. You will fine tune this as you go forward.
This:
Code: Select all
repeat with Numb = 1 to 70
put Numb & return after random_list_num
end repeat
might be made just a bit more elegant as:
Code: Select all
repeat with Numb = 1 to 70
put Numb into line Numb of random_list_num
end repeat
I just find that better. But yours works just fine. You do not need to empty the variable random_list_num. LC will happily create it at first mention in the repeat loop. And once you have already built the variable, there is no need to put it into another. Just work it directly:
Code: Select all
on randomPickNumber
repeat with Numb = 1 to 70
put Numb into line Numb of random_list_num
end repeat
sort random_list_num by random(9999)
end randomPickNumber
Keep at it. Keep posting.
Craig