# Addtionally challenged

**URL:** <https://forum.kirupa.com/t/addtionally-challenged/143654>\
**Category:** Uncategorized\
**Created:** [April 7, 2005, 6:15pm UTC](https://forum.kirupa.com/t/addtionally-challenged/143654 "2005-04-07T18:15:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cleverfish](https://avatars.discourse-cdn.com/v4/letter/c/e480ec/32.png) [@cleverfish](https://forum.kirupa.com/u/cleverfish)\
**Post date:** [April 7, 2005, 6:15pm UTC](https://forum.kirupa.com/t/addtionally-challenged/143654/1 "2005-04-07T18:15:45Z")

</div>

i want to add and subtract a number to the var currentProj  
heres my logic

start value for currentProj is 0

code on prevbtn  
currentProj -= 1; // should subtract 1 from currentProj

when prevbtn is clicked the variable currentProj  
goes from 0 to -1 to -2 to -3…etc with every click. this is fine once i set my limits at zero

code on nextbtn  
currentProj +=1; // should add 1 to currentProj

when nextbtn is clicked the variable currentProj  
goes from 0 to 01 to 011 to 0111…etc with every click. this is whack

I’ve wasted an hour trying to work around this and just need help

confused,  
JW
