I've found tips and tricks to figuring this out in the forums but i want to confirm if what im doing is right because i have a long list of 100 possible random text msgs and id like to know if my code is right before i start to input it. basically trying to use random variables to generate if else statements that dont repeat that output in text msgs.
note - the switch on is for another function that im using, so its needed you can ignore that part.
this is the simplest way ive gotten it down but want someone to look it over to see if this works or not? cuz its gonna be a very tedious process to input 100 random text msgs, as i dont really know how to do it using arrays since im not sure how to remove variables from arrays in javascript. tried looking it up... but... anyhow...
heres the code
if switch is on
control variable X = random 1..25
if x = 1
loop
if x = uniqueID1
control variable X = random 1..25
else
break loop
end
if x = 1
display_message
control variable uniqueID1 = x
end
else
if x = 2
loop
if x = uniqueID2
control variable X = random 1..25
else
break loop
end
if x = 2
display_message
control variable uniqueID2 = x
end
repeat for all 100 display messages
ok so does the code above look right to you? will it work? idk since i havent tried it yet, i may have to but, id like to save me the hassle of going through the whole process and then finding out it still repeats....!!!!
so i tried doing this using a small pool and it doesnt work for some reason, what happens is it doesnt repeat *good but then it also doesnt display the text messages after it displays itself once and only once. what am i doing wrong?
note - the switch on is for another function that im using, so its needed you can ignore that part.
this is the simplest way ive gotten it down but want someone to look it over to see if this works or not? cuz its gonna be a very tedious process to input 100 random text msgs, as i dont really know how to do it using arrays since im not sure how to remove variables from arrays in javascript. tried looking it up... but... anyhow...
heres the code
if switch is on
control variable X = random 1..25
if x = 1
loop
if x = uniqueID1
control variable X = random 1..25
else
break loop
end
if x = 1
display_message
control variable uniqueID1 = x
end
else
if x = 2
loop
if x = uniqueID2
control variable X = random 1..25
else
break loop
end
if x = 2
display_message
control variable uniqueID2 = x
end
repeat for all 100 display messages
ok so does the code above look right to you? will it work? idk since i havent tried it yet, i may have to but, id like to save me the hassle of going through the whole process and then finding out it still repeats....!!!!
so i tried doing this using a small pool and it doesnt work for some reason, what happens is it doesnt repeat *good but then it also doesnt display the text messages after it displays itself once and only once. what am i doing wrong?