Well, on the serverside, you got:
PHP Code:
if (params[0] == "settag"){
getguildnick(params[1], player.account);
}
I suppose getguildnick() takes the guild and the account as arguments (can't look it up, wiki's down

), but you currently pass the account to it twice, since in the case of /settag, params[1] is the account (you are passing it to the serverside in your trigger). Also, the function does not set the nick of the player, I'm quite sure about that. So you will have to do something like this:
PHP Code:
temp.nick = getguildnick(temp.guild, player.account);
findPlayer(player.account).nick = temp.nick SPC "(" @ temp.guild @ ")";