First of all, I suggest indenting your code to make it easier for both you and us to read:
//Sell
$itemPrices["Ore"]=5;
function serverCmdSell(%client, %item, %ammount)
{
$amount = $client.ore[%item];
if(%amount == 0 || %Amount > %client.Gold)
{
messageClient(%client, '', 'Not enough Ore! Ore: %1', %client.Ore);
return;
}
%client.Gold += %amount;
}
This makes it easier to see your 3 easy to make mistakes:
1. You made a typo in the 3rd argument (%ammount).
2. You said $amount instead of %amount. It's not a global variable.
3. You said $client.ore[%item] instead of %client.ore[%item]. Same problem.
Another problem (a logistical one this time) is that you forgot to factor in the price of the item when you added %amount to the client's gold. It should look more like this:
...
%client.Gold += (%amount * $itemPrices[%item]);
Also, in %amount > %client.Gold... you're saying, "if the amount of items the player wants to sell is greater than the amount of gold the player has, then...". Does this makes sense? You should instead say %amount > %client.quantity[%item]. This means you have to keep track of the quantitiy of each item a client has.