View Single Post
  #7  
Old 08-07-2010, 11:49 PM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
Alright I have a semi-related problem so I'll post it here instead of creating a new topic.
Working on a buff/debuff system I've decided to store the data I need a certain way:
e.g.: client.buffs = "Slow:60:-50","Bleed:25:100"

the 60 on the slow debuff represents the timer. so does the 25 on bleed.

now here's my problem: I seem unable to set the values representing the time left to another value. I had already changed my format thinking it was that i had all of the data for each buff as a string thinking maybe you can only change nonstring/nonquoted numbers. but i've changed it back since that didnt work.

This is the function I'm currently using to lower this value:
PHP Code:
function doReduceBuffTimer(){
  
temp.buffs client.buffs.tokenize(",");
  
temp.count temp.buffs.tokenize(",").size();
  for(
temp.0temp.temp.counttemp.++){ 
    
client.buffs.tokenize(",")[temp.c].tokenize(":")[1] -= 0.05;
  }

What am I doing wrong?
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote