Jump to content
Sign in to follow this  
LoveGameguadian

How to search and edit saved values ​​in a .cfg file with the lua script

Recommended Posts

Someone please help me !!! I want to search or edit a value saved to the .cfl file from before, what should I do ???

For example :

searchNumber How To??? 

Quote

function SearchRandom()
local configFile = gg.EXT_CACHE_DIR .. "/" .. gg.getFile():match("[^/]+$") .. ".cfg"
local data = loadfile(configFile)
if data ~= nil then
  data = data()
end
local input = gg.prompt({'Please input something .'},data, {"number"})
gg.saveVariable(input, configFile)

gg.clearResults()
gg.setRanges(gg.REGION_CODE_APP)
gg.searchNumber("How To??? ", gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1)
local r = gg.getResults(45)
gg.removeResults(r)
gg.getResults(1)
gg.editAll("How To??? ", gg.TYPE_FLOAT)
end

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By Xoklys
      I know if you write ..., true) behind the toast text that then the toast will disappear earlier but even if I don't think there is a way I have to ask for it:
      Is there a way to say gg how long a toast shall appear?
      And if there isn't a way this maybe would be an idea for next update
    • By Xoklys
      Ehm Enyby or who ever I just wanted to say that gg.toast isn't working(for me)
      I don't know why but when I execute the script it just don't appears...
      (I didn't code anything wrong hopefully because other wise this post would be very emberassing xD)

    • By Xoklys
      I got my results, added them to the save list and now I want to edit them all.
      I typed in:
      gg.getListItems(a)
      gg.editAll('1',gg.TYPE_DWORD)
       
    • By RONO_PLAYS
      More scripts from the creator
      This is a  template that will help you create a script menu for any game
      Download the apps used in this video:
      lua editor
      GG tester
       
      WATCH THESE VIDEOS TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
      PART 1
      WATCH THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       
      PART 2:
       
       
      PART 3
       
    • By RONO_PLAYS
      View File HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       More scripts from the creator
      This is a  template that will help you create a script menu for any game
      Download the apps used in this video:
      lua editor
      GG tester
       
      WATCH THESE VIDEOS TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
      PART 1
      WATCH THIS VIDEO TO KNOW HOW TO MAKE A LUA SCRIPT FOR ANY GAME
       
      PART 2:
       
       
      PART 3
       
      Submitter RONO_PLAYS Submitted 04/27/2019 Category Templates  
×
×
  • Create New...