Okay, so I've been working on this system to show how many buffs you have. And after some trial and error (as well as plenty of Access violations

) I had finally got it working. Everything was fine for a while, but now all of a sudden I've found that I cant move unless I rapidly click the mouse on the screen while holding down a direction, I cant use the chat box unless i hit tab and click on the screen at the same time, and if i do manage to bring up the chat box, it wont let me type anything. however the other default functions seems to work just fine (sword, open inventory, grab, etc)
I narrowed down the problem to the portion of this script that I was working on.. but theres nothing in it that would normally hinder movement ( it doesnt include movement speed mods nor player.freezetimes)
So I'm kind of lost on what's causing this. I have a hunch that it might be that the icons suddenly feel like taking focus when theyre made, but I'm not totally sure. And I cant check since I dont know the commands that manipulate the focus of a GUI. But this may not even be the case.
Here's the section of the code. The function is called every 0.05 seconds by the timeout function:
PHP Code:
function doCheckBuffs(){
temp.buffs = clientr.buffs.tokenize(",");
temp.count = temp.buffs.tokenize(",").size();
if(temp.iconnumbers == 0){
for(temp.a = 0; temp.a <= 100; temp.a ++){
makevar("Test_ShowImg_" @ temp.a).destroy();
}
temp.iconnumbers = 0;
}
for(temp.b = 0; temp.b < temp.count; temp.b ++){
new GuiShowImgCtrl("Test_ShowImg_" @ temp.b) {
x = 192 + (32*temp.b);
y = 130;
width = 60;
height = 60;
image = "j7_buff_alternate.png";
temp.iconnumbers += 1;
}
}
}
Any ideas what's causing my problem?