You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.OverflowException
HResult=0x80131516
Message=Value was either too large or too small for a UInt64.
Source=System.Private.CoreLib
StackTrace:
at System.Decimal.ToUInt64(Decimal d)
at System.Convert.ToUInt64(Decimal value)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(String Value)
at Mangos.World.Handlers.WS_Commands.cmdAddMoney(CharacterObject& objCharacter, String tCopper) in D:\USB DRIVE\Work\MangosSharp\MangosSharp\Source\Services\Mangos.World\Handlers\WS_Commands.cs:line 848
The text was updated successfully, but these errors were encountered:
The .addmoney command will use the cmdAddMoney method in MangosSharp/Source/Services/Mangos.World/Handlers/WS_Commands.cs, line 852.
In line 859, ulong Copper = Conversions.ToULong(tCopper) is throwing the OverflowException since it parses a negative number in an unsigned data type.
Consider changing the line to ulong Copper = (ulong)Conversions.ToLong(tCopper); , thus using the overflowed number and evading the exception.
This will add no money to the character
System.OverflowException
HResult=0x80131516
Message=Value was either too large or too small for a UInt64.
Source=System.Private.CoreLib
StackTrace:
at System.Decimal.ToUInt64(Decimal d)
at System.Convert.ToUInt64(Decimal value)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToULong(String Value)
at Mangos.World.Handlers.WS_Commands.cmdAddMoney(CharacterObject& objCharacter, String tCopper) in D:\USB DRIVE\Work\MangosSharp\MangosSharp\Source\Services\Mangos.World\Handlers\WS_Commands.cs:line 848
The text was updated successfully, but these errors were encountered: