• ✨ ARCHIVE MODE ✨
    The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
    We recommend you join our Discord server to get real-time response: Discord Invite Link

Fixed - [44.2] Unable to cast object

Rambomon

Pokémon Ranger
I was battling Karen when my other pokemon fainted and Talonfalme came into play . First time I used Flame Charge and the game crashed the moment i clicked enter over the move . I started the game and tried again to see if the crash repeats this time using Razor Wind (with Talonflame) and the game crashed again . I looked around if there is similar crash but I didn't find one . Hope its not a doublepost.

It was holding exp share . After I removed it it was normal again.

Code:
System specifications:
Pokémon 3D version: 0.44.2
Operating system: Microsoft Windows 7 Ultimate  [6.1.7601.65536]
System time: 1.2.2014 г. 13:58:35 ч.
System language: Bulgarian (Bulgaria)(BGR) / Loaded game language: en
Decimal seperator: ,
Content Packs: {}
Active GameMode: Pokemon 3D
GameJolt Account: TRUE (46883)
Playing on Servers: FALSE
Game environment: BattleScreenV2
Actionscript: No script running
---------------------------

Here is further information:
Message: Unable to cast object of type '_2._5DHero.Items.Standard.ExpShare' to type '_2._5DHero.Berry'.
InnerException: NOTHING
BaseException: Unable to cast object of type '_2._5DHero.Items.Standard.ExpShare' to type '_2._5DHero.Berry'.
HelpLink: No helplink available.
Data: Items: 0
Source: 2.5DHero
TargetSite: Name: GetAttackType [
   Attributes: PrivateScope, Public, Virtual, CheckAccessOnOverride
   CallingConvention: Standard, HasThis
   ContainsGenericParameters: False
   DeclaringType: _2._5DHero.BV2.Moves.Normal.NaturalGift
   IsAbstract: False
   IsAssembly: False
   IsConstructor: False
   IsFamily: False
   IsFamilyAndAssembly: False
   IsFamilyOrAssembly: False
   IsFinal: False
   IsGenericMethod: False
   IsGenericMethodDefinition: False
   IsHideBySig: False
   IsPrivate: False
   IsPublic: True
   IsSecurityCritical: True
   IsSecuritySafeCritical: False
   IsSecurityTransparent: False
   IsSpecialName: False
   IsStatic: False
   IsVirtual: True
   MemberType: Method
   MetadataToken: 100665715
   MethodHandle: System.RuntimeMethodHandle
   Module: 2.5DHero.exe
   ReflectedType: _2._5DHero.BV2.Moves.Normal.NaturalGift
   ]

CallStack:    at _2._5DHero.BV2.Moves.Normal.NaturalGift.GetAttackType(Boolean own, BattleScreenV2 BattleScreen)
   at _2._5DHero.BV2.BattleCalculation.CalculateEffectiveness(AttackV2 move, BattleScreenV2 BattleScreen, Pokemon p, Pokemon op, Boolean own)
   at _2._5DHero.BV2.TrainerAI.GetAIMove(BattleScreenV2 BattleScreen, RoundConst OwnStep)
   at _2._5DHero.BV2.BattleV2.GetOppStep(BattleScreenV2 BattleScreen, RoundConst OwnStep)
   at _2._5DHero.BV2.BattleV2.InitializeRound(BattleScreenV2 BattleScreen, RoundConst OwnStep)
   at _2._5DHero.BV2.BattleMenuV2.PressButtonMoves(BattleScreenV2 BattleScreen)
   at _2._5DHero.BV2.BattleMenuV2.UpdateMoves(BattleScreenV2 BattleScreen)
   at _2._5DHero.BV2.BattleMenuV2.Update(BattleScreenV2 BattleScreenV2)
   at _2._5DHero.BV2.BattleScreenV2.Update()
   at _2._5DHero.Basic.Update(GameTime gameTime)
   at _2._5DHero.DGame.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Microsoft.Xna.Framework.Game.Run()
   at _2._5DHero.Program.Main(String[] args)
 
Last edited:

Tornado9797

Content Developer
P3D Developer
Global Moderator
I was battling Karen when my other pokemon fainted and Talonfalme came into play . First time I used Flame Charge and the game crashed the moment i clicked enter over the move . I started the game and tried again to see if the crash repeats this time using Razor Wind (with Talonflame) and the game crashed again . I looked around if there is similar crash but I didn't find one . Hope its not a doublepost.

It was holding exp share . After I removed it it was normal again.

Code:
System specifications:
Pokémon 3D version: 0.44.2
Operating system: Microsoft Windows 7 Ultimate  [6.1.7601.65536]
System time: 1.2.2014 г. 13:58:35 ч.
System language: Bulgarian (Bulgaria)(BGR) / Loaded game language: en
Decimal seperator: ,
Content Packs: {}
Active GameMode: Pokemon 3D
GameJolt Account: TRUE (46883)
Playing on Servers: FALSE
Game environment: BattleScreenV2
Actionscript: No script running
---------------------------

Here is further information:
Message: Unable to cast object of type '_2._5DHero.Items.Standard.ExpShare' to type '_2._5DHero.Berry'.
InnerException: NOTHING
BaseException: Unable to cast object of type '_2._5DHero.Items.Standard.ExpShare' to type '_2._5DHero.Berry'.
HelpLink: No helplink available.
Data: Items: 0
Source: 2.5DHero
TargetSite: Name: GetAttackType [
   Attributes: PrivateScope, Public, Virtual, CheckAccessOnOverride
   CallingConvention: Standard, HasThis
   ContainsGenericParameters: False
   DeclaringType: _2._5DHero.BV2.Moves.Normal.NaturalGift
   IsAbstract: False
   IsAssembly: False
   IsConstructor: False
   IsFamily: False
   IsFamilyAndAssembly: False
   IsFamilyOrAssembly: False
   IsFinal: False
   IsGenericMethod: False
   IsGenericMethodDefinition: False
   IsHideBySig: False
   IsPrivate: False
   IsPublic: True
   IsSecurityCritical: True
   IsSecuritySafeCritical: False
   IsSecurityTransparent: False
   IsSpecialName: False
   IsStatic: False
   IsVirtual: True
   MemberType: Method
   MetadataToken: 100665715
   MethodHandle: System.RuntimeMethodHandle
   Module: 2.5DHero.exe
   ReflectedType: _2._5DHero.BV2.Moves.Normal.NaturalGift
   ]

CallStack:    at _2._5DHero.BV2.Moves.Normal.NaturalGift.GetAttackType(Boolean own, BattleScreenV2 BattleScreen)
   at _2._5DHero.BV2.BattleCalculation.CalculateEffectiveness(AttackV2 move, BattleScreenV2 BattleScreen, Pokemon p, Pokemon op, Boolean own)
   at _2._5DHero.BV2.TrainerAI.GetAIMove(BattleScreenV2 BattleScreen, RoundConst OwnStep)
   at _2._5DHero.BV2.BattleV2.GetOppStep(BattleScreenV2 BattleScreen, RoundConst OwnStep)
   at _2._5DHero.BV2.BattleV2.InitializeRound(BattleScreenV2 BattleScreen, RoundConst OwnStep)
   at _2._5DHero.BV2.BattleMenuV2.PressButtonMoves(BattleScreenV2 BattleScreen)
   at _2._5DHero.BV2.BattleMenuV2.UpdateMoves(BattleScreenV2 BattleScreen)
   at _2._5DHero.BV2.BattleMenuV2.Update(BattleScreenV2 BattleScreenV2)
   at _2._5DHero.BV2.BattleScreenV2.Update()
   at _2._5DHero.Basic.Update(GameTime gameTime)
   at _2._5DHero.DGame.Update(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
   at Microsoft.Xna.Framework.GameHost.OnIdle()
   at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
   at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
   at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at Microsoft.Xna.Framework.WindowsGameHost.Run()
   at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
   at Microsoft.Xna.Framework.Game.Run()
   at _2._5DHero.Program.Main(String[] args)
Never seen this kind of error before. Definitely an issue with the Experience Share. Just avoid using it for now whenever possible. That's really all I can say right now.
 

nilllzz

Original Developer
Administrator
P3D Developer
Fixed. It was an error with the Natural Gift move and every Item that isnt a berry.
 
Top