Kilra Yan Member Feb 9, 2016 #1 What is wrong with that code? Code: BaseWeapon wea = o as BaseWeapon; foreach( int i in Enum.GetValues(typeof( AosWeaponAttribute)) ) Server crashes server like that System.InvalidCastException: Specified cast is not valid.
What is wrong with that code? Code: BaseWeapon wea = o as BaseWeapon; foreach( int i in Enum.GetValues(typeof( AosWeaponAttribute)) ) Server crashes server like that System.InvalidCastException: Specified cast is not valid.
OP Kilra Yan Member Feb 9, 2016 #2 Solved. For anyone who having that problem (just like script in colored weaps) you have to look at imbuing foreach (long i in Enum.GetValues(typeof(AosWeaponAttribute)))
Solved. For anyone who having that problem (just like script in colored weaps) you have to look at imbuing foreach (long i in Enum.GetValues(typeof(AosWeaponAttribute)))
Voxpire Vita-Nex Administrator Feb 9, 2016 #3 Thank you for posting this, it validates my point about invalid casting in this thread; https://www.servuo.com/threads/i-need-my-memory-jogged.3615/ which some people didn't seem to want to accept
Thank you for posting this, it validates my point about invalid casting in this thread; https://www.servuo.com/threads/i-need-my-memory-jogged.3615/ which some people didn't seem to want to accept