of     1   

yurhomi10
#182942725Wednesday, February 03, 2016 8:11 PM GMT

no errors, i think my conditions arent right but not sure whats not right about them. repeat wait() until _G.que and _G.sparring que = _G.que ; spar = _G.sparring while #que >= 2 and #spar == 0 do -- not running not sure why wait(0.01) print("enough players") print(#que, #spar) end
Happywalker
#182942771Wednesday, February 03, 2016 8:12 PM GMT

eew dirty
yurhomi10
#182942831Wednesday, February 03, 2016 8:14 PM GMT

lol whats dirty
Happywalker
#182942874Wednesday, February 03, 2016 8:15 PM GMT

your code
yurhomi10
#182943077Wednesday, February 03, 2016 8:19 PM GMT

help?
ParadigmaticAnon
#182943107Wednesday, February 03, 2016 8:19 PM GMT

Very interesting. Are you certain that the variables are truly receiving the values from the global table?
Happywalker
#182943201Wednesday, February 03, 2016 8:21 PM GMT

The wait(0.01) is very interesting as well, but shouldn't be the reason why it doesn't work Try printing after the first line to check if the loop actual found the two vars
yurhomi10
#182943373Wednesday, February 03, 2016 8:25 PM GMT

my two tables are empty, some values are added when you click a button but i tried doing this on a test server and it just doesnt do the while loop at all, i knwo that because it doesnt print the "enough players" string.
Happywalker
#182943406Wednesday, February 03, 2016 8:25 PM GMT

I mean the repeat loop
yurhomi10
#182943551Wednesday, February 03, 2016 8:28 PM GMT

i put a print(#que, #spar) after the repeat. I got 0 and 0 but that's expected, it just doesn't do anything when both conditions are met (2 players are que'd and 0 are sparring)
Happywalker
#182943805Wednesday, February 03, 2016 8:32 PM GMT

Well if they're both 0, the while loop will never start ("while #que >= 2") Changing que will not update the while loop, you need to start it somehow.
script_frog
#182943851Wednesday, February 03, 2016 8:33 PM GMT

um dont use _G i make u math.sqrt()
yurhomi10
#182944218Wednesday, February 03, 2016 8:39 PM GMT

But players will eventually be added into the table, like i had two test players in it and it would do nothing
Happywalker
#182944310Wednesday, February 03, 2016 8:40 PM GMT

The line with the while loop won't see that because it doesn't get updated all the time
yurhomi10
#182944527Wednesday, February 03, 2016 8:44 PM GMT

Oh i get it now, i forgot if you store a value in a variable it will always be the same even though it changes so instead of #que i should just do #_G.que
Happywalker
#182944669Wednesday, February 03, 2016 8:47 PM GMT

Yes that is true as well xd I don't really know how to explain this.. Try while wait() do if _G.#que >= 2 and _G.#spar == 0 print("enough players") print(#que, #spar) end end
yurhomi10
#182944922Wednesday, February 03, 2016 8:51 PM GMT

Hey thanks for the help i gotta go for now but will try that code later, thanks :)!

    of     1