View Single Post
  #1  
Old 10-26-2010, 10:53 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Strange problem. Variable isn't adding?

Alright so I have this script:

PHP Code:
      if("paralysis" in this.screffs){ //Check if this is true.
        
temp.paralyzecounter += 0.05//Add to the counter.
        
if(temp.paralyzecounter >= 1){ //See if the counter is 1 or higher.
          
random(0,100);
          if(
<= 25){
            
triggerserver("gui"this.name"freezeplayer"player.account0.5"Paralyzed!");
          }
          
temp.paralyzecounter 0//Reset the counter.
        
}
        
player.chat temp.paralyzecounter//Check to see if the number is changing.
      
}
      elseif(!(
"paralysis" in this.screffs)){temp.paralyzecounter 0;} //If false, reset the number. 
It's being run through a timeout of course, and I've tested to see what happens if i put player.chat = serverr.time and it is indeed updating more than once.

however, for some strange reason, temp.paralyzecounter will always return 0.05 And yes, I have also tried removing both parts that reset the timer, and I'm 100% certain that temp.paralyzecounter is handled anywhere else in the weapon.

Any ideas on why it won't add?
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote