HelpText

Moved

Total Downloads: 18,186 - First Release: Oct 23, 2014 - Last Update: Feb 3, 2017

4.92105/5, 38 likes
  1. can some one edit this so it list the commands I want in the file or give me a file that I can edit so I can get the right format..
     

    Attached Files:

  2. Hello,

    I've wrote the following in the json-File:
    Code:
    {
      "CustomHelpText": [
        "Benutze /who um zu sehen wer online ist",
        "Benutze /pm <name> <message> um zu flüstern"
      ],
      "Settings": {
        "AllowHelpTextFromOtherPlugins": "false",
        "UseCustomHelpText": "true"
      }
    }
    But i get only:
    [​IMG]

    What is wrong?
     
  3. Wulf

    Wulf Community Admin

    Did you reload the plugin with "oxide.reload HelpText" in your console?
     
  4. Yes. I've restarted the server also :)

    Maybe some things in the lua-file are wrong:

    Code:
    function PLUGIN:LoadDefaultConfig()
        self.Config.Settings = self.Config.Settings or {}
        self.Config.Settings.UseCustomHelpText = self.Config.Settings.UseCustomHelpText or "true"
        self.Config.Settings.AllowHelpTextFromOtherPlugins = self.Config.Settings.AllowHelpTextFromOtherPlugins or "false"
        self.Config.CustomHelpText = self.Config.CustomHelpText or {
           "Benutze /who um zu sehen wer online ist",
           "Benutze /pm <name> <message> um zu flüstern"
        }
        self:SaveConfig()
    end
     
  5. Wulf

    Wulf Community Admin

    Don't edit the .lua file, only edit the .json file for it under oxide/config.
     
  6. Well when it has a config u aren't supposed to edit the plugin file... Idk if something is wrong but just as a rule of thumb...
     
  7. OK. I've downloaded the plugin again. I made no changes in the LUA-file.
    I changed the JSON-file (same text above), reloaded the plugin. But nothing happens.

    Result is the same
     
  8. Wulf

    Wulf Community Admin

    The only way it'd be the same, is if it isn't being edited in the right location or it wasn't reloaded with the changes, else the config changes you are making are formatted improperly, and the plugin is resetting to defaults. Where are you editing the config?
     
  9. The config needs to be in oxide/Config
    Is it there? Or are u editing it elsewhere
    Also try reloading the plugin using oxide.reload helptext
     
  10. The plugin create a new JSON file. This changed:
    Code:
    {
      "CustomHelpText": [
        "Test helptext",
        "custom helptext"
      ],
      "Settings": {
        "AllowHelpTextFromOtherPlugins": "false",
        "UseCustomHelpText": "true"
      }
    }
    Then I reload the plugin. But currently I get only the helptext from other plugins.
    The config file is under oxide/config.
     
  11. Ok then it is not reading anything... From the config where is its file location
     
  12. I've reloaded the plugin again. Now i become follwing error:
    [Oxide] 6:06 PM [Error] helptext: Failed to save config file (does the config have illegal objects in it?) (Access to the path "c:\gameservers\s779471\RustExp\server\serverdata\oxide\config\helptext.json" is denied.)
     
  13. Ok it's in the right location but game servers seems to be blocking you from editing your config files which makes no since because I use the same provider and have no issues
    [DOUBLEPOST=1437588704][/DOUBLEPOST]Well actually not sure if it is in the right location... Mine is server then oxide no serverdata
     
  14. Other configs are in the same folder. And no issues.
    I've made a ticket to the server provider. Maybe they can tell me the reason.
     
  15. Ok, good luck idk why our servers would be set up differently
     
  16. The Server Support checked the permissions and have changed them. Everything is fine in this case.
    But a new error occurs:
    If I Change the 2 Standard lines, the plugin load the config:
    Code:
    {
      "CustomHelpText": [
        "Benutze /who um zu sehen wer online ist",
        "Benutze /pm <name> <text> zum flüstern - /r zum antworten"
      ],
      "Settings": {
        "AllowHelpTextFromOtherPlugins": "false",
        "UseCustomHelpText": "true"
      }
    }
    When I add an third line, following error occurs:

    [Oxide] 5:48 PM [Error] helptext: Failed to load config file (is the config file corrupt?) (After parsing a value an unexpected character was encountered: ". Path 'CustomHelpText[1]', line 5, position 2.)

    The third line is:
    "Benutze /ticket um ein Ticket zu erstellen"

    I can't find an unexpected character.
     
  17. Wulf

    Wulf Community Admin

    Are you saving the file as UTF-8? It's likely being thrown off by the non-English characters.
     
  18. Standard type was UTF-8 without BOM. I've changed to UTF-8 but the same error occurs.
     
  19. Wulf

    Wulf Community Admin

    Ah, so you removed a line. Make sure you are placing commas after each line except the last.
    Code:
    {
      "CustomHelpText": [
        "Benutze /who um zu sehen wer online ist",
        "Benutze /pm <name> <text> zum flüstern - /r zum antworten",
        "Benutze /ticket um ein Ticket zu erstellen"
      ],
      "Settings": {
        "AllowHelpTextFromOtherPlugins": "false",
        "UseCustomHelpText": "true"
      }
    }
     
  20. I see my error. I forgot the comma at the end of the line from the 2nd line. Now its working. Thanks for help :D