espcevan
Sorceror
All I'm trying to do is get the tokens to the Master Looter instead of the Token Ledger
Having a little issue with this. I'm getting the same error for 2 lines.
Errors:
+ Custom Systems/Daat99/Tokens/Safe Trash 4 Tokens Backpack.cs:
CS0019: Line 234: Operator '+' cannot be applied to operands of type 'ulong' and 'int'
CS0019: Line 237: Operator '+' cannot be applied to operands of type 'ulong' and 'int'
Line 134
Line 137
Any Suggestions?
Having a little issue with this. I'm getting the same error for 2 lines.
Errors:
+ Custom Systems/Daat99/Tokens/Safe Trash 4 Tokens Backpack.cs:
CS0019: Line 234: Operator '+' cannot be applied to operands of type 'ulong' and 'int'
CS0019: Line 237: Operator '+' cannot be applied to operands of type 'ulong' and 'int'
Code:
public static void EmptyTrash(Mobile from, Item item)
{
List<Item> items = item.Items;
if ( items.Count > 0 )
{
int i_Reward = 0;
from.PlaySound(0x76);
for ( int i = items.Count - 1; i >= 0; --i )
{
if ( i >= items.Count )
continue;
Item it = (Item)items[i] as Item;
if ( it.Stackable == false && !(item is BaseBook) )
i_Reward += Utility.RandomMinMax(2,5);
((Item)items[i]).Delete();
}
if (i_Reward > 0)
{
Item[] lootbag = from.Backpack.FindItemsByType( typeof( MasterLooterBackpack ) );
//Item[] ledgers = from.Backpack.FindItemsByType( typeof( TokenLedger ) );//Original
foreach( MasterLooterBackpack ml in lootbag )
//foreach( TokenLedger tl in ledgers )//Original
{
if ( ml.Owner == from.Serial )
//if ( tl.Owner == from.Serial )//Original
{
if ((ml.TokensAmount + i_Reward) <= 2000000000 )
//if ((tl.Tokens + i_Reward) <= 2000000000 )//Original
{
ml.TokensAmount = (ml.TokensAmount + i_Reward);
//tl.Tokens = (tl.Tokens + i_Reward);//Stock
from.SendMessage(1173, "You were rewarded {0} Tokens to your Master Looter for cleaning the shard.", i_Reward);
//from.SendMessage(1173, "You were rewarded {0} Tokens to your ledger for cleaning the shard.", i_Reward);//Original
break;
}
else
from.SendMessage(1173, "You have a full Mater Looter, please make a check and store it in your bank.");
//from.SendMessage(1173, "You have a full token ledger, please make a check and store it in your bank.");//Original
}
}
}
}
}
Line 134
Code:
if ((ml.TokensAmount + i_Reward) <= 2000000000 )
Line 137
Code:
ml.TokensAmount = (ml.TokensAmount + i_Reward);
Any Suggestions?