Having trouble formatting multiple menusSolved
It should be like:
"List of menus": [
{
"Menu title": "Panel",
"Menu title color": "#ffffff",
"Menu title size": 12,
"Menu title height": 0.1,
"Menu permission": "gamemenu.use",
"Chat command to open the menu": "menu",
"Console command to open the menu": "menu",
"Background color": "0.66 0.66 0.66 0.9",
"Menu buttons": [
{
"Button color": "0.0 0.0 0.0 1.0",
"Text color": "#ffffff",
"Text size": 12,
"Button width": 0.4,
"Button height": 0.1,
"Button text": "Accept TP",
"Execute chat (true) or console (false) command": true,
"Executing command": "/tpa"
}
]
},
{
"Menu title": "Panel",
"Menu title color": "#ffffff",
"Menu title size": 12,
"Menu title height": 0.1,
"Menu permission": "gamemenu.use",
"Chat command to open the menu": "menu",
"Console command to open the menu": "menu",
"Background color": "0.66 0.66 0.66 0.9",
"Menu buttons": [
{
"Button color": "0.0 0.0 0.0 1.0",
"Text color": "#ffffff",
"Text size": 12,
"Button width": 0.4,
"Button height": 0.1,
"Button text": "Accept TP",
"Execute chat (true) or console (false) command": true,
"Executing command": "/tpa"
}
]
}
] Merged post
I am getting this error when trying to set up multiple menu's
[Game Menu] Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: ?. Path '['List of menus']', line 49, position 1.
at Newtonsoft.Json.JsonTextReader.ParsePostValue () [0x00179] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.JsonTextReader.Read () [0x0005a] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x0028e] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0015c] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0006d] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000d9] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0
at Oxide.Core.Configuration.DynamicConfigFile.ReadObject[T] (System.String filename) [0x00028] in <4452f821def6406d834e4149849fe7ea>:0
at Oxide.Plugins.GameMenu.LoadConfig () [0x0000d] in <f6fee26321eb4a1e80cf11ca36c82281>:0
Merged post
I have my config file set up as below
{
"Distance between buttons": 0.02,
"FadeIn and FadeOut time": 0.3,
"List of menus": [
{
"Menu title": "Teleport",
"Menu title color": "#ffffff",
"Menu title size": 12,
"Menu title height": 0.1,
"Menu permission": "teleport.use",
"Chat command to open the menu": "teleport",
"Console command to open the menu": "teleport",
"Background color": "0.66 0.66 0.66 0.9",
"Menu buttons": [
{
"Button color": "0.0 0.0 0.0 1.0",
"Text color": "#ffffff",
"Text size": 12,
"Button width": 0.4,
"Button height": 0.1,
"Button text": "Accept TP",
"Execute chat (true) or console (false) command": true,
"Executing command": "/tpa"
}
]
},
{
"Menu title": "Outpost",
"Menu title color": "#ffffff",
"Menu title size": 12,
"Menu title height": 0.1,
"Menu permission": "Outpost.use",
"Chat command to open the menu": "Outpost",
"Console command to open the menu": "outpost",
"Background color": "0.66 0.66 0.66 0.9",
"Menu buttons": [
{
"Button color": "0.0 0.0 0.0 1.0",
"Text color": "#ffffff",
"Text size": 12,
"Button width": 0.4,
"Button height": 0.1,
"Button text": "Outpost",
"Execute chat (true) or console (false) command": true,
"Executing command": "/town"
}
]
}
]
In response to xxxxxsilentxxxxx ():is there a way to have multiple buttons
Merged post
I am getting this error wh...
{
"Distance between buttons": 0.02,
"FadeIn and FadeOut time": 0.3,
"List of menus": [{
"Menu title": "Teleport",
"Menu title color": "#ffffff",
"Menu title size": 12,
"Menu title height": 0.1,
"Menu permission": "teleport.use",
"Chat command to open the menu": "teleport",
"Console command to open the menu": "teleport",
"Background color": "0.66 0.66 0.66 0.9",
"Menu buttons": [{
"Button color": "0.0 0.0 0.0 1.0",
"Text color": "#ffffff",
"Text size": 12,
"Button width": 0.4,
"Button height": 0.1,
"Button text": "Accept TP",
"Execute chat (true) or console (false) command": true,
"Executing command": "/tpa"
}]
},
{
"Menu title": "Outpost",
"Menu title color": "#ffffff",
"Menu title size": 12,
"Menu title height": 0.1,
"Menu permission": "Outpost.use",
"Chat command to open the menu": "Outpost",
"Console command to open the menu": "outpost",
"Background color": "0.66 0.66 0.66 0.9",
"Menu buttons": [{
"Button color": "0.0 0.0 0.0 1.0",
"Text color": "#ffffff",
"Text size": 12,
"Button width": 0.4,
"Button height": 0.1,
"Button text": "Outpost",
"Execute chat (true) or console (false) command": true,
"Executing command": "/town"
}]
}
]
}i would recomend to use a json validator In response to xxxxxsilentxxxxx ():is there a way to have multiple buttons
Merged post
I am getting this error wh...
Error: Parse error on line 1:
"List of menus": [{ "Menu title":
---------------^
Expecting 'EOF', '}', ',', ']', got ':'Merged post
so we cant have multiple menus ????
Merged post
anyone got a multiple menu config that works ?