1. Recently I made a plugin 'Shop'. To generate the prices need to restart the server ... This is due to the fact that it was impossible to change DataFile from outside the plugin! Since the table is associated with a plugin DataFile. And I can not get the data from the file again as it could in the old oxide. I get the data from the table, not file.
    Code:
    data = datafile.GetDataTable( '1' ) -- from file
    -- ... --
    data = datafile.GetDataTable( '1' ) -- a second time from the table, ignoring the new content file

    Someone has an idea?

    p.s. sry for my english ;d
     
    Last edited by a moderator: Nov 16, 2014
  2. Why don't you store the prices in the config file?
     
  3. Only way for that would be to put à :
    local data = blabla
    But then it would mean that the file Will get read every time you use à command, and as all datas dont get reset, it would mean that at some point you would get useless Memory usage.
    No only way would be to restart the plugin after you change the data file.
    [DOUBLEPOST=1416182226][/DOUBLEPOST]Or pût it un the config :p
     
  4. In my opinion the config and the date should be separated. It will be practical for people to share their price list or store them as separate files. But each has its own configuration.
    In any case, it may be necessary not only here, so it would be nice to add this functionality in the oxide.
     
  5. why do you need to reload the data file then?
     
  6. To be able to edit the prices without restarting the server.
     
  7. manually edit the prices? or edit it from ingame?
    but if you edit manually the price why dont you just reload the plugin?
     
  8. He remembers the table, and when you reload the plugin uses old.
     
    Last edited by a moderator: Nov 17, 2014
  9. Ah yes i remember that :X
    Hmmm i guess the best way would be to make an ingame management of the prices so admins dont edit them manually in the file.
     
  10. I suppose I could add some kind of datafile.Reload function. You could then tie that to a console command, or upon plugin load.
     
  11. This is quite inconvenient, still have to climb in the file for the names.

    It will be great.