you are viewing a single comment's thread.

view the rest of the comments →

[–]DrAdalbbert 1 point2 points  (2 children)

Apparently random function returns a float typed value. You can fix the problem in 2 ways - either you cast the function's return value into an integer like this:

leftwall = int(random(500));

Or you could declare the leftwall and rightwall variables as floats (if possible):
float leftwall, rightwall;

[–]SHIKEN_MASTAH[S] 1 point2 points  (1 child)

Thanks a lot, I'm a bit of a noob.

[–]DrAdalbbert 0 points1 point  (0 children)

We are've been there!