I'm trying to declare a few simple variables as part of a function in a very basic collision detection programme. For some reason it's rejecting my variables (although only some of them even though they're near identical). Here's the code for the function;
def TimeCheck():
timechecknumber = int(time.time())
timecheckdiv = backcolourcheck % 5
if timecheckdiv < 1:
timecheck = true
else:
timecheck = false
if timecheck == true:
backgroundr = (int(random.random()*255)+1
backgroundg = (int(random.random()*255)+1
backgroundb = (int(random.random()*255)+1
for some reason it accepts backgroundr but not backgroundg, anyone got any ideas why? thanks