Jump to content

Error on Console! a big one!

Pending 1.1.8

D33pakGanesh
D33pakGanesh

Posted

Error pops up on console when you click on a map to view:
Failed to call hook 'votemap_view' on plugin 'VoteMap v1.1.8' (ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index) at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <f98723dd4586469db5213ec59da723ca>:0 at Oxide.Plugins.VoteMap.ImageGalCui (BasePlayer player, System.Int32 mapID, System.Int32 imgNumber) [0x0000c] in <e551bba386a44dabbeabfc80b2a1170c>:0 at Oxide.Plugins.VoteMap.ViewMapCui (BasePlayer player, System.Int32 mapID, System.Int32 onPage, System.Boolean api) [0x0018d] in <e551bba386a44dabbeabfc80b2a1170c>:0 at Oxide.Plugins.VoteMap.votemap_view (ConsoleSystem+Arg arg) [0x000be] in <e551bba386a44dabbeabfc80b2a1170c>:0 at Oxide.Plugins.VoteMap.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00841] in <e551bba386a44dabbeabfc80b2a1170c>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9c80d821d00a44c9a24497c73ad2d20d>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <d646191a355d43a6b3ab36b7ee14c740>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d646191a355d43a6b3ab36b7ee14c740>:0

David

Posted

Going to need your data files and config as well so I can replicate the issue on my side.

D33pakGanesh

Posted

data:
 

{

  "1": {

    "mapName": "SUNDAY MAP I",

    "mapDescription": "SUNDAY MAP I Details:\nMap Size: 3700\nMap Link: https://rustmaps.com/map/4a08ffd3a02b46a09b220cd9977f5630",

    "mapImage": "https://content.rustmaps.com/maps/264/4a08ffd3a02b46a09b220cd9977f5630/map_icons.png",

    "moreImages": []

  },

  "2": {

    "mapName": "SUNDAY MAP II",

    "mapDescription": "SUNDAY MAP II Details:\nMap Size: 3700\nMap Link: https://rustmaps.com/map/b04488b6bdcd4650ad664bc070437e94",

    "mapImage": "https://content.rustmaps.com/maps/264/b04488b6bdcd4650ad664bc070437e94/map_icons.png",

    "moreImages": []

  },

  "3": {

    "mapName": "SUNDAY MAP III",

    "mapDescription": "SUNDAY MAP III Details:\nMap Size: 3700\nMap Link: https://rustmaps.com/map/df30fdc971f54f10bc30ef5eadb25a27",

    "mapImage": "https://content.rustmaps.com/maps/264/df30fdc971f54f10bc30ef5eadb25a27/map_icons.png",

    "moreImages": []

  }

}

Config:

 

{

  "Vote Settings": {

    "Reset votes on NewSave (when map is changed).": true,

    "Number of votes allowed per one player.": 1,

    "Chat command to open VoteMap ui.": "votemap",

    "Color Scheme (0 = default | 1 = customizable).": 0

  },

  "Discord Message": {

    "Enable discord message.": true,

    "Discord WebHook URL": "https://discord.com/api/webhooks/",

    "Send message X seconds before wipe.": 600,

    "Embed Message Color code.": 2458828,

    "Message (Do not delete from list, just change left side values!).": {

      "ServerTitle": "{hostname}",

      "UnderServerTitle": "Map **voting** results for the following **wipe**.",

      "MapTitle": "Voted Map:",

      "UnderMapTitle": "Voted by {votes} players!",

      "mention": ""

    },

    "Already broadcasted?": false

  },

  "Color Scheme Customization": {

    "background": "0 0 0 0.8",

    "main": "0 0 0 0.7",

    "title": "0 0 0 0.5",

    "map": "0.11 0.11 0.11 0.7",

    "vote": "0.01960784 0.4313726 0.8705883 1",

    "view": "0.18 0.18 0.18 1.0",

    "close": "0.01960784 0.4313726 0.8705883 1",

    "Img gallery AnchorMin": "0.05 0.30",

    "Img gallery AnchorMax": "0.65 0.89",

    "Shadow": true

  }

}


Also plugin wont work in Welcome Panel i have attached image for that:

Screenshot 2025-02-17 170458.png

D33pakGanesh

Posted

39 minutes ago, D33pakGanesh said:

data:
 

{

  "1": {

    "mapName": "SUNDAY MAP I",

    "mapDescription": "SUNDAY MAP I Details:\nMap Size: 3700\nMap Link: https://rustmaps.com/map/4a08ffd3a02b46a09b220cd9977f5630",

    "mapImage": "https://content.rustmaps.com/maps/264/4a08ffd3a02b46a09b220cd9977f5630/map_icons.png",

    "moreImages": []

  },

  "2": {

    "mapName": "SUNDAY MAP II",

    "mapDescription": "SUNDAY MAP II Details:\nMap Size: 3700\nMap Link: https://rustmaps.com/map/b04488b6bdcd4650ad664bc070437e94",

    "mapImage": "https://content.rustmaps.com/maps/264/b04488b6bdcd4650ad664bc070437e94/map_icons.png",

    "moreImages": []

  },

  "3": {

    "mapName": "SUNDAY MAP III",

    "mapDescription": "SUNDAY MAP III Details:\nMap Size: 3700\nMap Link: https://rustmaps.com/map/df30fdc971f54f10bc30ef5eadb25a27",

    "mapImage": "https://content.rustmaps.com/maps/264/df30fdc971f54f10bc30ef5eadb25a27/map_icons.png",

    "moreImages": []

  }

}

Config:

 

{

  "Vote Settings": {

    "Reset votes on NewSave (when map is changed).": true,

    "Number of votes allowed per one player.": 1,

    "Chat command to open VoteMap ui.": "votemap",

    "Color Scheme (0 = default | 1 = customizable).": 0

  },

  "Discord Message": {

    "Enable discord message.": true,

    "Discord WebHook URL": "https://discord.com/api/webhooks/",

    "Send message X seconds before wipe.": 600,

    "Embed Message Color code.": 2458828,

    "Message (Do not delete from list, just change left side values!).": {

      "ServerTitle": "{hostname}",

      "UnderServerTitle": "Map **voting** results for the following **wipe**.",

      "MapTitle": "Voted Map:",

      "UnderMapTitle": "Voted by {votes} players!",

      "mention": ""

    },

    "Already broadcasted?": false

  },

  "Color Scheme Customization": {

    "background": "0 0 0 0.8",

    "main": "0 0 0 0.7",

    "title": "0 0 0 0.5",

    "map": "0.11 0.11 0.11 0.7",

    "vote": "0.01960784 0.4313726 0.8705883 1",

    "view": "0.18 0.18 0.18 1.0",

    "close": "0.01960784 0.4313726 0.8705883 1",

    "Img gallery AnchorMin": "0.05 0.30",

    "Img gallery AnchorMax": "0.65 0.89",

    "Shadow": true

  }

}


Also plugin wont work in Welcome Panel i have attached image for that:

Screenshot 2025-02-17 170458.png

 

Screenshot 2025-02-27 181307.png

David

Posted

On 2/23/2025 at 7:18 AM, D33pakGanesh said:

Error pops up on console when you click on a map to view:
Failed to call hook 'votemap_view' on plugin 'VoteMap v1.1.8' (ArgumentOutOfRangeException: Index was out of range.

This error comes from you not having any images set in "moreImages" (data file). 

 

On 2/27/2025 at 7:33 AM, D33pakGanesh said:

Also plugin wont work in Welcome Panel i have attached image for that:

It does work for me with your configuration. If you still having this issue please check for console errors when you click on Vote Map button. 

image.png.c104b8892cca9e227be430f71c395fda.png

D33pakGanesh

Posted

can you provide an example config of using it in WelcomePanel?

 

D33pakGanesh

Posted

also got this error when trying to use votemap_msg
Failed to call hook 'storemenuvalue' on plugin 'VoteMap v1.1.8' (IndexOutOfRangeException: Index was outside the bounds of the array.) at Oxide.Plugins.VoteMap.SendDiscordMessage (System.Int32 mapId, System.Int32 mapVotes, System.Boolean procedural) [0x00271] in <1158d437453644738ae6cd823dab57dc>:0 at Oxide.Plugins.VoteMap.storemenuvalue (ConsoleSystem+Arg arg) [0x00099] in <1158d437453644738ae6cd823dab57dc>:0 at Oxide.Plugins.VoteMap.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00afe] in <1158d437453644738ae6cd823dab57dc>:0 at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9c80d821d00a44c9a24497c73ad2d20d>:0 at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <d646191a355d43a6b3ab36b7ee14c740>:0 at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <d646191a355d43a6b3ab36b7ee14c740>:0

 

1.6m

Downloads

Total number of downloads.

7.7k

Customers

Total customers served.

115.5k

Files Sold

Total number of files sold.

2.4m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.