Jump to content
Kiloo-kuoma

I have problem in loading results

Recommended Posts

Hi, so i have problem, i want to search current player username and edit it in other function, but i dont know how to get previous search results to work in other function. Script is below:

function namechanger()
gg.setRanges(old)
gg.alert("⛔remember CaPs!⛔")
local searcher = gg.prompt({"Username: leave -> ; <-!!!!!"}, {[1]=';'})
if searcher[1] then
gg.searchNumber(searcher[1])
local r = gg.getResults(10000)
gg.toast("Now time to edit the name")
editer()
else
test()
end
end

function editer()
editor = gg.prompt({"Edited Username Here:"},{[1] = ";"},nil)
if editor[1] then
gg.loadResults(r)
gg.editAll(editor[1])
test()
gg.toast("Name Changed♥️")
test()
gg.clearResults(r)
end 
if editor[nil] then test() end
end

If you know how to load previous function results into next function, pls help me. This username is not changing to what i want it to.

Share this post


Link to post
Share on other sites
function namechanger()
gg.setRanges(old)
--gg.alert("remember CaPs!")
local searcher = gg.prompt({"⚠️Remember CAPS⚠️\nEnter Username:"}, {[1]='; <--Keep this symbol'})
if searcher == nil then test()
else
    
gg.searchNumber(searcher[1])
gg.toast("Now time to edit the name")

local editor = gg.prompt({"Edited Username Here :"},{[1] = ";"})
if editor == nil then gg.clearResults() test() 
else

local r = gg.getResults(10000)      
gg.editAll(editor[1])
--test()
gg.toast("Name Changed")
--test()
gg.clearResults()
end 
end
end

 

Edited by MonkeySAN

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

×
×
  • Create New...