This may be really off, but I tried to make it so when a player touches the npc it adds 1 to the item_playersname in the databse. Can someone explain what is wrong here and how to fix please?
In NPC:
PHP Code:
function onPlayerTouchsMe() {
this.playername = player.account;
this.ida = stats_(this.playername);
DB_test.addstats(this.ida) += 1;
}
In Database:
PHP Code:
function onCreated() {
this.item_Graal1059025 =1;
}
public function addstats(this.ida) {
return this.(@ "item_" @ this.ida) += 1;
}