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 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  
    • 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 Squidoodle04
      I want to make a script where you can close GG without ending script.
      Is this possible and if yes, could someone explain me how?
    • By Squidoodle04
      Hello,
      I saw some scripts where GG searched the numbers so fast that you couldn't even see them.
      Could someone tell me how this is possible and explain how it works
      and how I can make it myself?
    • By NMYT
      How do i freeze number? I thought it might be gg.freezeNumber but idk for sure and i dont wanna break my script
×
×
  • Create New...