# "cannot convert float to boolean"

**URL:** <https://discourse.processing.org/t/cannot-convert-float-to-boolean/6822>\
**Category:** Beginners\
**Created:** [December 22, 2018, 10:43am UTC](https://discourse.processing.org/t/cannot-convert-float-to-boolean/6822 "2018-12-22T10:43:00Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [December 24, 2018, 2:02pm UTC](https://discourse.processing.org/t/cannot-convert-float-to-boolean/6822/6 "2018-12-24T14:02:23Z")

</div>

pls. do not answer here!

> [@"dvd cannot be resolved to a variable"](https://discourse.processing.org/t/dvd-cannot-be-resolved-to-a-variable/6876):
>
> I’ve got a different problem while trying to add a sprite and it says "dvd cannot be resolved to a variable float x = random(200,300); // x location of square float y = random(200,300); // y location of square float xspeed = 1; // speed of square float yspeed = 1; // speed of square void setup() { size(800, 600); frameRate(240); //surface.setResizable(true); PImage dvd; /// dvd dvd = loadImage("dvd.png"); /// dvd } void draw() { background(255); fill(0,0,0); rect(0,0…

---

_[View the full topic](https://discourse.processing.org/t/cannot-convert-float-to-boolean/6822)._
