1. 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
     
  2. Wulf

    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 \.
     
  3. Thx for help. :)
     
  4. 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,
    }
    }
    
    What is wrong with it? I escaped te " with \, but Timed Execute think the file is corrupt. :/
    And by the way is it possible to save the settings under timer once? writecfg doesent work with that.

    MfG Bi0
     
  5. Here is your fix
     

    Attached Files:

  6. 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
  7. You cant put it in the place where you put it thats why I removed it from there and fixed the other mistakes you had
     
  8. 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 Bi0
     
    Last edited by a moderator: Apr 10, 2018
  9. Wulf

    Wulf Community Admin

    You'd want \, not / for escaping. From your previous changes, you're trying to escape ALL of the quotation marks, which is wrong; you only need escape the quotation marks that are inside of the string in each line.
     
    Last edited: Apr 9, 2018
  10. I removed it as you done it wrong so follow what Wulf said until you get it right and check it on this site first before uploading it