syllxvestern Posted July 13, 2020 Share Posted July 13, 2020 sorry im still a noob in creating script, my stupid question is how i can get all saved list and edit all in another function? it give me error when i call gg.getListItems() on ::GP:: this my code : function ch1() button = gg.choice({ "Scan Anyar", "Ganti Posisi", }, nil, 'Posisi XD') if button == 1 then goto SA end if button == 2 then goto GP end ::SA:: gg.removeListItems() gg.setRanges(gg.REGION_C_ALLOC) gg.searchNumber('0.029999999329447746;1.7999999523162842;0.25999999046325684;0.8999999761581421', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber('0.8999999761581421', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) local t = gg.getResults(8) local d = gg.prompt({A='Mbok Ganti Piro Posisine ?'}, {A='0'}) gg.editAll(d.A, gg.TYPE_FLOAT) gg.addListItems(t) gg.toast("Wokkeh") gg.clearResults() ::GP:: local x = gg.getListItems() gg.loadResults(x) gg.getResults(8) local c = gg.prompt({A='Mbok Ganti Piro Posisine ?'}, {A='0'}) gg.editAll(c.A,gg.TYPE_FLOAT) gg.clearResults() gg.toast("Wokkeh") gg.clearResults() Link to comment Share on other sites More sharing options...
MonkeySAN Posted July 13, 2020 Share Posted July 13, 2020 try this local gg = gg function ch1() button = gg.choice({ "Scan Anyar", "Ganti Posisi"}, nil, "Posisi XD") if button == nil then os.exit() end if button == 1 then SA() end if button == 2 then GP() end end function SA() gg.clearList() gg.setRanges(gg.REGION_C_ALLOC) gg.searchNumber('0.029999999329447746;1.7999999523162842;0.25999999046325684;0.8999999761581421', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber('0.8999999761581421', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) local t = gg.getResults(8) local d = gg.prompt({A='Mbok Ganti Piro Posisine ?'}, {A='0'}) if d == nil then gg.clearResults() ch1() else gg.editAll(d.A, gg.TYPE_FLOAT) gg.addListItems(t) gg.clearResults() gg.toast("Wokkeh") end end function GP() local c = gg.prompt({A='Mbok Ganti Piro Posisine ?'}, {A='0'}) if c == nil then ch1() else local x = gg.getListItems() gg.loadResults(x) gg.getResults(8) gg.editAll(c.A,gg.TYPE_FLOAT) gg.clearResults() gg.toast("Wokkeh") end end while true do if gg.isVisible(true) then gg.setVisible(false) ch1() end end Link to comment Share on other sites More sharing options...
syllxvestern Posted July 13, 2020 Author Share Posted July 13, 2020 36 minutes ago, MonkeySAN said: try this local gg = gg function ch1() button = gg.choice({ "Scan Anyar", "Ganti Posisi"}, nil, "Posisi XD") if button == nil then os.exit() end if button == 1 then SA() end if button == 2 then GP() end end function SA() gg.clearList() gg.setRanges(gg.REGION_C_ALLOC) gg.searchNumber('0.029999999329447746;1.7999999523162842;0.25999999046325684;0.8999999761581421', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) gg.searchNumber('0.8999999761581421', gg.TYPE_FLOAT, false, gg.SIGN_EQUAL, 0, -1) local t = gg.getResults(8) local d = gg.prompt({A='Mbok Ganti Piro Posisine ?'}, {A='0'}) if d == nil then gg.clearResults() ch1() else gg.editAll(d.A, gg.TYPE_FLOAT) gg.addListItems(t) gg.clearResults() gg.toast("Wokkeh") end end function GP() local c = gg.prompt({A='Mbok Ganti Piro Posisine ?'}, {A='0'}) if c == nil then ch1() else local x = gg.getListItems() gg.loadResults(x) gg.getResults(8) gg.editAll(c.A,gg.TYPE_FLOAT) gg.clearResults() gg.toast("Wokkeh") end end while true do if gg.isVisible(true) then gg.setVisible(false) ch1() end end Mantap Jiwa! ... thank you very much, if you have a little time for me, can you explain to me why my script is wrong ?? Link to comment Share on other sites More sharing options...
Question
syllxvestern
sorry im still a noob in creating script, my stupid question is how i can get all saved list and edit all in another function?
it give me error when i call gg.getListItems() on ::GP::
this my code :
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.