Author Topic: Help with an event  (Read 1157 times)

Maybe you should try registering the output events at the top OUTSIDE of the package

Thank you lugnut it has no syntax errors now.
But it doesn't appear in the eventing GUI. This is now the code:

Edit: Oops this is an old version forgot replacing "client" with "gameconnection".
Second edit: Thank you so much nerra and lugnut!!! It now works!!
Locking topic...
Code: [Select]

registerOutputEvent(client, "addCredits","int -10000 10000 25", 1);

function Client::addCredits(%client, %amount)
{
%old = %client.credits;
%client.credits = (%old + %amount);
}

registerOutputEvent(client, "setCredits","int -10000 10000 25", 1);

function Client::setCredits(%client, %amount)
{
%client.credits = %amount;
}

registerOutputEvent(client, "addIceCrystals","int -10000 10000 25", 1);

function Client::addIceCrystals(%client, %amount)
{
%old = %client.icecrystal;
%client.icecrystal = (%old + %amount);
}

registerOutputEvent(client, "setIceCrystals","int -10000 10000 25", 1);

function Client::setIceCrystals(%client, %amount)
{
%client.icecrystal = %amount;
}

registerOutputEvent(client, "addGold","int -10000 10000 25", 1);

function Client::addGold(%client, %amount)
{
%old = %client.gold;
%client.gold = (%old + %amount);
}

registerOutputEvent(client, "setGold","int -10000 10000 25", 1);

function Client::setGold(%client, %amount)
{
%client.gold = %amount;
}

« Last Edit: August 13, 2012, 05:52:27 PM by hammereditor² »