makes a mistake local variable 'randc' referenced before assignment dicsord.py.
-
I made mistakes. Here's the code.
async def Mishka(ctx): global x r = (random.randint(1,1000)) if r <= 799>800: randc = (random.choice(rand2)) elif r >= 801<950: randc = (random.choice(rand1)) elif r >= 951<1000: randc = (random.choice(rand3)) await ctx.send(randc) ```
-
Condition
x < y < z
equivalent conditionx < y and y < z
♪ What is a sign of comparison there, the point is, how this is divided into two conditions, the rule is the same. Therefore, your first condition is never met at all, and the remaining right is always fulfilled. In general, it looks like you didn't have the conditions, and the variable didn't do anything before it was sent.