PHP Code:
function onCreated() {
this.db = findnpc("DB_Auction");
}
function onActionServerSide() {
if (params[0] == "getItemsCat") {
temp.listz = this.db.getCategoryListing(params[1]);
echo(temp.listz);
triggerClient("weapon", this.name, "setList", this.db.getCategoryListing(params[1]), params[1]);
}
}
//#CLIENTSIDE
function onActionClientSide() {
if (params[0] == "setList") {
player.chat = params[2];
}
}
temp.listz never echoes on the serverside, and player.chat doesnt say anything on the clientside. This is what is in the npc.
PHP Code:
public function getCategoryListing(temp.category){
clearemptyvars();
temp.list = {};
for (temp.acnt: this.item.(@temp.category).getdynamicvarnames() ){
for (temp.item: this.item.(@temp.category).(@temp.acnt).getdynamicvarnames() ){
temp.v = this.item.(@temp.category).(@temp.acnt).(@temp.item);
temp.list.add({ temp.item, temp.v[0], temp.acnt, temp.v[3] });
}
}
return temp.list;
}
this is the flags in the npc:
PHP Code:
this.item.Weapons.sssssssssss.Sword={sword2.png,0,0,0}
Weapons.sssssssssss.Sword={sword2.png,0,0,0}
(also tried just this.Weapons.sssssss.......)
Its not doing anything :/ this.db is to the correct db name too.