# This is probably a pretty newb question

**URL:** https://forum.kirupa.com/t/this-is-probably-a-pretty-newb-question/298551
**Category:** Uncategorized
**Created:** [October 21, 2009, 12:41am UTC](https://forum.kirupa.com/t/this-is-probably-a-pretty-newb-question/298551 "2009-10-21T00:41:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![axafekt](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@axafekt](https://forum.kirupa.com/u/axafekt)
#### Post date: [October 21, 2009, 12:41am UTC](https://forum.kirupa.com/t/this-is-probably-a-pretty-newb-question/298551/1 "2009-10-21T00:41:33Z")

</div>

but i am having trouble with switch statements it might be because i dont fully comprehend it but here is the code

```auto
switch();
    if (newball.hitTestObject(wall_1)) 
    
    {
    spd = -spd/1.2;
    }
    
    break;
    
    if (newball.hitTestObject(wall_2)) 
    {
    spd = -spd/1.2;
    }
    
    break;
    if (newball.hitTestObject(wall_3)) 
    {
    spd = -spd/1.2;
    }
    
    break;
    if (newball.hitTestObject(wall_4)) 
    {
    spd = -spd/1.2;
    }
    break;

```

what am i doing wrong
