this is my code for a sleep button in my game:
Code:
on(release){ 
if(day >= 1){
day += 1;
hp += 50;
}
else if(day = 25){
_root.gotoAndPlay ("cat")
}
 else if(day=30){ 
this.enabled = false; 
}
}
when I test my game, day doesn't stop at 30 or go to "cat" at 25.....
_______________________________

also how can I change this code:
Code:
on(release){
	if(exp == 0){
 hp -= 10;
gotoAndPlay("talk 1");  
}else if(hp<10) {
gotoAndPlay ("no hp left");
}else if(exp == 10) {
hp -= 10;
gotoAndPlay ("talk 2");
}else if(hp<10){
gotoAndPlay ("no hp left");
}
}
to make it so that when you go back to the chat button and you have 0 exp, instead of going back to "talk 1" you go to "talk 2"?

i know, this is alot to ask, im just stumped when it comes to these codes T_T