I can't find out why this function doesn't make the weapon's this.TGuild_Button5's type 1. Heres my line of code.
PHP Code:
function setButtonType( obj, type) {
with(obj) {
if (type == 1) {
red = 0.5;
green = 0.5;
blue = 0.5;
this.(@ obj @ "_Type") = type;
}
}
player.chat = this.TGuild_Button5_Type;
}