Author Topic: Output Event -Where'd I go wrong?  (Read 467 times)

It's bizarre. Help?

Code: [Select]
registerOutputEvent(GameConnection,AddMerch,"list Gold 0 Silk 1 Spices 2 Porcelain 3 Diamonds 4" TAB "int -10000 10000 10");

function GameConnection::AddMerch(%client, %thing, %amnt)
{
if(%thing == 0)
{
%client.Gold += %amnt;
}
else if(%thing == 1)
{
%client.Silk += %amnt;
}
else if(%thing == 2)
{
%client.Spices += %amnt;
}
else if(%thing == 3)
{
%client.Porcelain += %amnt;
}
else if(%thing == 4)
{
%client.Diamonds += %amnt;
}
}

Are there any console errors? What's going wrong? What have you tried changing?

Well, when I actually place the event onActivate for example, nothing happens. No errors, no nothing.

I'm stooped.

I tried to exec thru console. Just restarted server, it works fine :/