Haitiaan Posted May 17, 2020 Posted May 17, 2020 i ceep getting error when i try to divide the results, were im going wrong? Quote search1= 30 x = x/3 gg.searchNumber(search1, gg.TYPE_FLOAT) a = gg.getResults(8000) gg.addListItems(a) gg.editAll(x, gg.TYPE_FLOAT) gg.clearResults()
0 Haitiaan Posted May 19, 2020 Author Posted May 19, 2020 1 minute ago, zam535582 said: How do we divide a nil value? even 0 is a value and you still get 0 when divide with any numbers. that's why i had the problem, x was supposed to be whatever the result was and then divide through 3...only problem is actually its a group search...that's why x was supposed to be nil..it was supposed to take whatever was gone be in the results..am i explaining correct to you?
0 zam535582 Posted May 19, 2020 Posted May 19, 2020 (edited) Quote search1= 30 x = x/3 gg.searchNumber(search1, gg.TYPE_FLOAT) a = gg.getResults(8000) gg.addListItems(a) gg.editAll(x, gg.TYPE_FLOAT) gg.clearResults() You search for number 30. results will show values with 30 only. then edit with x value?? where the x is coming from?? Edited May 19, 2020 by zam535582
0 Haitiaan Posted May 19, 2020 Author Posted May 19, 2020 it has to be group search, if i have to type every value down and edit them 1 by 1 it wont be productive for future parts of the scripts. X was supposed to be the function to edit the results. if i put "x" instead of the value it was supposed to mean that after gg.getResults(100) X would then take those results and divide it through 3.. from there x = x/3
0 ItsSC Posted May 19, 2020 Posted May 19, 2020 (edited) function X(value,range) local value, range = value, range; local code = value .. ";" ; local next = value/ 3; local previous = next; code = code .. next .. ";" ; for i = 1 , range-1 do next = previous / 3; code = code .. next .. ";" ; previous = next; end code = code .. "::" .. tostring((range)* 4 + 1); return code end -- Usage x = X(30,2) print(x) -- output : 30;10;3::13 Edited May 19, 2020 by ItsSC 1
0 Administrators Enyby Posted May 19, 2020 Administrators Posted May 19, 2020 54 minutes ago, Haitiaan said: X would then take those results and divide it through 3.. from there x = x/3 You better show full example with all numbers. For example for 10 rows. What you get from search, what you want receive as result and so on. Because you use word "devide" with some sence only known for you. 4
0 zam535582 Posted May 19, 2020 Posted May 19, 2020 On 5/18/2020 at 8:31 PM, zam535582 said: im a noob...really. i try to search Google...What is x? - The results could be anything in this whole universe. so..we are playing a guessing game now? quoting myself...
Question
Haitiaan
i ceep getting error when i try to divide the results, were im going wrong?
21 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now