Well since I haven't a clue what's wrong, here's the whole serverside script:
NPC Code:
if (actionserverside) {
tokens=params[0].tokenize;;
if (!params[1].starts("*")&&!strcontains(#p(1),"staff")&&!params[1].starts("subclass/")) {
putnpc2 tokens[0],tokens[1],{
this.image=tokens[2];
this.player=tokens[3];
this.class=tokens[4];
this.weapon=tokens[5];
setimg("block.png");
chat=this.weapon;
if (this.image.length()>=2) setimg(this.image);
for (pl: allplayers){
if (pl.account==this.player) {
removeweapon #s(this.weapon);
insertstring client.messages,0,you dropped a #s(this.weapon);
}
}
}
function onPlayerTouchsMe() {
addweapon(this.weapon);
destroy;
}
};
You'll notice that for once I styled my script
NOte: It isn't completely GS2 yet, I figure it best to finish that after the errors are gone, and they shouldn't affect the rest of the code.