[Solved] Question! Variables

Anonynn
13 Feb 2016, 03:22
if (this.cursecount = 35) {
msg ("Once again, you notice the prominent dark glow of the black satin material hugging your body like a glove. You know for sure this time that the intensity of the aura it exudes is becoming stronger than it previously was, mostly because you couldn't see it in your peripheral vision before (except for a brief amount of time) but now you easily can. Maybe this is what happened the first time too, only this time the glow isn't receding. Is it building strength? Or possibly draining you of yours? You do feel a bit weaker than you previously were, and your mind is very hazy, but you can't explain why all of a sudden. The only conclusion you can come too is that the outfit is somehow behind it. Maybe this curse is stronger than you previously thought...")
if (not player.strength = 0) {
}
else {
player.strength = player.strength - 1
}
if (not player.agility = 0) {
}
else {
player.agility = player.agility - 1
}
if ( not player.intelligence = 0) {
}
else {
player.intelligence = player.intelligence - 1
}
if (not player.defence = 0) {
}
else {
player.defence = player.defence - 1
}
}


So I have this code, and it works. What doesn't work are the stat drains that are supposed to happen.

I'm wondering if I should make "else if's" rather than "else's" .... any thoughts?

Anonynn
13 Feb 2016, 04:08
Nevermind. I figured it out. I'm an idiot. It has to be...

if (this.cursecount = 35) {
msg ("Once again, you notice the prominent dark glow of the black satin material hugging your body like a glove. You know for sure this time that the intensity of the aura it exudes is becoming stronger than it previously was, mostly because you couldn't see it in your peripheral vision before (except for a brief amount of time) but now you easily can. Maybe this is what happened the first time too, only this time the glow isn't receding. Is it building strength? Or possibly draining you of yours? You do feel a bit weaker than you previously were, and your mind is very hazy, but you can't explain why all of a sudden. The only conclusion you can come too is that the outfit is somehow behind it. Maybe this curse is stronger than you previously thought...")
if (not player.strength = 0) {
player.strength = player.strength - 1
}
}

Ugh!