# I need your help please :/

**URL:** https://discourse.processing.org/t/i-need-your-help-please/16658
**Category:** Coding Questions
**Created:** [December 27, 2019, 5:32pm UTC](https://discourse.processing.org/t/i-need-your-help-please/16658 "2019-12-27T17:32:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MonteliaRO](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/monteliaro/32/8303_2.png) [@MonteliaRO](https://discourse.processing.org/u/MonteliaRO)
#### Post date: [December 27, 2019, 5:32pm UTC](https://discourse.processing.org/t/i-need-your-help-please/16658/1 "2019-12-27T17:32:42Z")

</div>

if(mousePressed){  
cursor(maus2, maus2.width/2, maus2.height/2);  
} else {  
cursor(maus, maus.width/2, maus.height/2);}

why dont work? pls i need the help

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [December 27, 2019, 5:58pm UTC](https://discourse.processing.org/t/i-need-your-help-please/16658/2 "2019-12-27T17:58:08Z")

</div>

A man tried to cross the road and failed… why did he fail?

Your code gives us about as much context as the sentence above. Post more code.

---

<div class="post-metadata">

### Author: ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)
#### Post date: [December 27, 2019, 6:07pm UTC](https://discourse.processing.org/t/i-need-your-help-please/16658/4 "2019-12-27T18:07:37Z")

</div>

```auto
void mousePressed(){
if(mousePressed){
//if(mouseX>x && mouseX <x+w && mouseY>y && mouseY <y+h){
//launch(“C:/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe”);
//}
if(mousePressed){
//if(mouseX>1124 && mouseX <1124+93 && mouseY>765 && mouseY <765+93){
//link(“https://wallpaperplay.com/board/blue-space-wallpapers”);
//}
if(mousePressed){
cursor(maus2, maus2.width/2, maus2.height/2);
} else {
cursor(maus, maus.width/2, maus.height/2);}
}
}
}

```

your last condition is wrapped up in the first mousePressed statement

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a22961d9e7422c239a470f504c0d6073ab951fc8.png)

notice the highlighted bracket corresponds to the if(mousePressed function.

try this instead

```auto
void mousePressed(){
if(mousePressed){
if(mouseX>x && mouseX <x+w && mouseY>y && mouseY <y+h){
launch(“C:/Program Files (x86)/Minecraft Launcher/MinecraftLauncher.exe”);
}
if(mousePressed){
if(mouseX>1124 && mouseX <1124+93 && mouseY>765 && mouseY <765+93){
link(“https://wallpaperplay.com/board/blue-space-wallpapers”);
}}
if(mousePressed){
cursor(maus2, maus2.width/2, maus2.height/2);
} else {
cursor(maus, maus.width/2, maus.height/2);}
}
}

```

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [December 27, 2019, 7:11pm UTC](https://discourse.processing.org/t/i-need-your-help-please/16658/6 "2019-12-27T19:11:32Z")

</div>

Hey @MonteliaRO

welcome to the forum!

Nice to have you here!

please don’t delete your posts, since the good answers are then without context and therefore not understandable anymore.

Just leave your questions and answers as they are.

Thank you!

Regards, Chrisir
