Jump to content
  • 0

Specified argument was out of the range of valid values. (NPC EDITOR)


mem981
 Share

Question

when I click save in Editor Form(NPC editor). this error

--------------------------------------------------------------------------------

2021-10-05 04:14:11.234 [Error] 

  Message: Specified argument was out of the range of valid values.

    Stack:    at Intersect.Models.LookupUtils.GetGameObjectType(Type type) in G:\PROJECT\Main\Main\Intersect-Engine-prerelease\Intersect (Core)\Models\LookupUtils.cs:line 102

   at Intersect.Models.DatabaseObject`1.get_Type() in G:\PROJECT\Main\Main\Intersect-Engine-prerelease\Intersect (Core)\Models\DatabaseObject.cs:line 49

   at Intersect.Editor.Networking.PacketSender.SendSaveObject(IDatabaseObject obj) in G:\PROJECT\Main\Main\Intersect-Engine-prerelease\Intersect.Editor\Networking\PacketSender.cs:line 169

   at Intersect.Editor.Forms.Editors.FrmNpc.btnSave_Click(Object sender, EventArgs e) in G:\PROJECT\Main\Main\Intersect-Engine-prerelease\Intersect.Editor\Forms\Editors\frmNpc.cs:line 77

   at System.Windows.Forms.Control.OnClick(EventArgs e)

   at System.Windows.Forms.Button.OnClick(EventArgs e)

   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

   at DarkUI.Controls.DarkButton.OnMouseUp(MouseEventArgs e)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ButtonBase.WndProc(Message& m)

   at System.Windows.Forms.Button.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

--------------------------------------------------------------------------------

my code

frmNpc.cs

NpcBase.cs

 

tks for help!

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Sorry but this feels incredibly low effort and like a "go fix it for me" topic. 

 

What have you changed? 

What do you do when the issue happens? 

What have you tried to debug it with? 

What do you think causes it? 

 

And providing two files out of context of the rest of the project assumes we build a project surrounding it to make it run just to fix an issue you are putting no effort in to telling us about. That seems a bit unreasonable. 

 

Could you provide a bit more information than just an error that doesn't really tell us anything? 

Link to comment
Share on other sites

  • 0
3 hours ago, Cheshire said:

Sorry but this feels incredibly low effort and like a "go fix it for me" topic. 

 

What have you changed? 

What do you do when the issue happens? 

What have you tried to debug it with? 

What do you think causes it? 

 

And providing two files out of context of the rest of the project assumes we build a project surrounding it to make it run just to fix an issue you are putting no effort in to telling us about. That seems a bit unreasonable. 

 

Could you provide a bit more information than just an error that doesn't really tell us anything? 

1. I add new stats, and many more, sorry I can't list them all because there are so many features

Spoiler

private void nudCritChance_ValueChanged(object sender, EventArgs e)

{ mEditorItem.Stats[(int)Stats.Chimang] = (int) nudCritChance.Value; }

2. I checking log, deleted NpcEditor.frm and NpcEditor.cs, and paste old NpcEditor.frm and NpcEditor.cs from backup project (my backup not bug).. I build complete but still "Specified argument was out of the range of valid values" When save in NPC editor

- I tried coppy NpcEditor.frm and NpcEditor.cs from bug project to my backup project and not bug??, it's working

3. I think a value is wrong type or bigger than max value int (I tried looking for it but can't find it).

my database Playerdata and Gamedata

Npc.cs (server)

If you don't mind, I can send my project to you. Thanks for reminding me, I feel like I really haven't made an effort <3

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...