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.c = 0; temp.c < temp.count; temp.c ++){
client.buffs.tokenize(",")[temp.c].tokenize(":")[1] -= 0.05;
}
}
What am I doing wrong?