# Code problemo, pls help!

**URL:** <https://forum.kirupa.com/t/code-problemo-pls-help/275552>\
**Category:** Uncategorized\
**Created:** [November 15, 2008, 3:21pm UTC](https://forum.kirupa.com/t/code-problemo-pls-help/275552 "2008-11-15T15:21:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leo75](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@Leo75](https://forum.kirupa.com/u/Leo75)\
**Post date:** [November 15, 2008, 3:21pm UTC](https://forum.kirupa.com/t/code-problemo-pls-help/275552/1 "2008-11-15T15:21:25Z")

</div>

[SIZE=3][FONT=Times New Roman]What the hell is wrong with this code?[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]I created “imaginary” squares of 240b x 320h so I am moving a frame that will show me in which of these same squares i am on top off.[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Lets say, if you click 32 times down, you gonna end on top of square 32 since I am creating an imaginary 7x7 matrix, and i am starting from square num 25.[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]But when I am “clicking” up and down, it doenst work so well. The actual numbers change.[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Any help?[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Thanks.[/FONT][/SIZE]  
[SIZE=3][FONT=Times New Roman]Cheers.[/FONT][/SIZE]  
[FONT=Times New Roman]Leo.[/FONT]

```auto

[SIZE=3][FONT=Times New Roman]function up() [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]{[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] mc_all_areas._y = mc_all_areas._y +10;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] trace("value of y: "+ mc_all_areas._y);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] trace("Name of curr square: "+ _global.m_name_cur_square);[/FONT][/SIZE]
 
[SIZE=3][FONT=Times New Roman] if ((mc_all_areas._y%320) == 0)[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] _global.m_dist_f_center++;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] _global.m_name_cur_square = _global.m_name_cur_square -7;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
 
[SIZE=3][FONT=Times New Roman]}[/FONT][/SIZE]
 
[SIZE=3][FONT=Times New Roman]function down()[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]{[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] mc_all_areas._y = mc_all_areas._y -10;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] trace("value of y: "+ mc_all_areas._y);[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] trace("Name of curr square: "+ _global.m_name_cur_square);[/FONT][/SIZE]
 
[SIZE=3][FONT=Times New Roman] if ((-1)*((mc_all_areas._y)%320) == 0)[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] {[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] _global.m_dist_f_center--;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] _global.m_name_cur_square = _global.m_name_cur_square +7;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman] }[/FONT][/SIZE]
 
[FONT=Times New Roman]}[/FONT]

```
