Hi,
i have the problem that i want to declare a [ and ] as text in a plugin config.
"01:45:00": "server.hostname "[EU] Server Name [Plugin/Plugin/Plugin/Plugin/Plugin/Plugin]"",
In Batch you do a ^ before your character to let the programm know it is not a command character, only text.
Is there a similar way for Oxide Plugins to get this working?
Mfg Bi0
Solved Escaping quotation marks in config file?
Discussion in 'Rust Discussion' started by ॐ Bi0sh0k ॐ, Mar 24, 2018.
-
Wulf Community Admin
Plugin config files are JSON, which isn’t something unique to Oxide. In JSON, you’d generally only need to escape “ inside of other “, not [. Your issue is that you need to escape the “ with \.
-
Thx for help.
-
i think it something doesnt work. The problem is that the [ and ] are needed in that case.
Code:TimedExecute v0.7.3: Failed to load config file (is the config file corrupt?) (After parsing a value an unexpected character was encountered: \. Path 'RealTime-Timer.18:58:05', line 10, position 32.) Loaded plugin Timed Execute v0.7.3 by PaiN
Code:{ "EnableInGameTime-Timer": false, "EnableRealTime-Timer": true, "EnableTimerOnce": true, "EnableTimerRepeat": true, "InGameTime-Timer": {}, "RealTime-Timer": { "18:55:00": "say <color=red>Server restart in 5 minutes</color>", "18:58:00": "say <color=red>Prepare for the server restart within the next minutes</color>", "18:58:05": "server.hostname "\Rust Effect [Loot++/Kit/Home/QSmelt/Zlevels] Force Wipe 06.04"\", "18:58:10": "writecfg", "18:59:29": "save", "18:59:30": "say <color=red>All progress has saved till now</color>", "18:59:31": "say <color=red>Please wait till the server restart...</color>", "18:59:49": "restart 10" }, "TimerOnce": { "spawn.min_rate 1.25": 1, "spawn.max_rate 1.5": 1, "spawn.min_density 1.25": 1, "spawn.max_density 1.5": 1, "stability.collapse 0.01": 1 }, "TimerRepeat": { "airstrike squad random": 2700, "global.extbackup": 1800, } }
And by the way is it possible to save the settings under timer once? writecfg doesent work with that.
MfG Bi0 -
Attached Files:
-
-
is " "18:58:05": "server.hostname "\Rust Effect [Loot++/Kit/Home/QSmelt/Zlevels] Force Wipe 06.04"\"," not possible to set in that case?
"18:58:05": "command "" "
the "" in the "" itselfs causing the error. Wulf told me to escape the with \, but it didnt work sadly or i do it wrong.
"18:58:05": "command "\text"\ "
"18:58:05": "\command "text" "\
"18:58:05": "command "text" "\
How do i doing it right?Last edited by a moderator: Apr 9, 2018 -
-
It is possible to get this done.
Like Wulf said.
The solution is to type it like this:
"18:30:00" "Command \"A text that count as one string\""
For all others who search for the solution.
MfG Bi0Last edited by a moderator: Apr 10, 2018 -
Wulf Community Admin
Last edited: Apr 9, 2018 -