Quote:
Originally Posted by cbk1994
The problem is that you're triggering serverside like it's a weapon. You can't do that.
Instead, something like
PHP Code:
function onCreated() { this.itemName = "whatever"; this.itemPrice = 123123; this.setShape(1, 16, 16); // so it can be triggered) }
function onActionPurchase() { echo(player.account @ " wants to purchase this item!"); }
//#CLIENTSIDE function Shop_Button1.onAction() { if (client.gold > client.store1 || client.gold == client.store1) { if (!(hasweapon((@client.realitem)))) { triggerAction(this.x, this.y, "purchase", null); } } }
|
I am using a class. Why are you telling me to assign item details in the class when I will be selling different items at different prices?