Jump to content

Question

Posted
function D()
  gg.setRanges(gg.REGION_ANONYMOUS)
  gg.getResults(gg.getResultsCount())
  gg.clearResults()
  gg.searchNumber("", gg.TYPE_DWORD)
  gg.refineNumber("", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1)
  gg.startFuzzy(gg.TYPE_FLOAT, gg.getResults(1)[1].address - 100, gg.getResults(1)[1].address - 92)
  gg.clearResults()
  function doAction()
    if gg.alert([[
PRESS THE CORRECT SIDE OF TO MAKE A GOAL 
If you are in 0 to 45 min of the match press -
If you are in 45 to 90 minutes of the game press +]], "GOOOLLL  +", "GOOOLLL  -", "BACK") == 1 then
      STM0[1].value = math.random(175, 177)
      STM0[2].value = math.random(1, 5)
      STM0[3].value = math.random(-5, 5)
      gg.setValues(STM0)
    end
    if gg.alert([[
PRESS THE CORRECT SIDE OF TO MAKE A GOAL 
If you are in 0 to 45 min of the match press -
If you are in 45 to 90 minutes of the game press +]], "GOOOLLL  +", "GOOOLLL  -", "BACK") == 2 then
      STM0[1].value = math.random(-177, -175)
      STM0[2].value = math.random(1, 5)
      STM0[3].value = math.random(-5, 5)
      gg.setValues(STM0)
    end
    if gg.alert([[
PRESS THE CORRECT SIDE OF TO MAKE A GOAL 
If you are in 0 to 45 min of the match press -
If you are in 45 to 90 minutes of the game press +]], "GOOOLLL  +", "GOOOLLL  -", "BACK") == 3 then
      gg.clearResults()
      dosf()
    end
  end
  
  gg.setVisible(false)
  while true do
    if gg.isVisible() then
      gg.setVisible(false)
      doAction()
    end
  end
end

im always getting this error 

Script error: luaj.o: /storage/emulated/0/SCRIPT/Simple Multi menu.lua:41 STM0[1].value = math.random(175, 177) attempt to index? (a nil value) with key '1' (global 'STM0') level = 1, const = 24, proto = 0, upval = 1, vars = 5, code = 93 GETTABLE vo vo 1

 

can you guys help me please 

6 answers to this question

Recommended Posts

  • 0
Posted

[ @notzagred ]
---

Quote

can you guys help me please 

It means that: the table "STM0" is empty or to put it in another words: there are no results.
---

Quote

im always getting this error 

You need to provide the entire script, I can't see where "STM0" is located. Or you can simply fix it yourself by putting this:

if STM0 ~= nil then
	STM0[1].value = math.random(175, 177)
	STM0[2].value = math.random(1, 5)
	STM0[3].value = math.random(-5, 5)
	gg.setValues(STM0)
end

---

  • 0
Posted
On 6/16/2024 at 6:27 AM, kiynox said:
if STM0 ~= nil then
	STM0[1].value = math.random(175, 177)
	STM0[2].value = math.random(1, 5)
	STM0[3].value = math.random(-5, 5)
	gg.setValues(STM0)
end

for wich line i put this code? @kiynox

  • 0
Posted
On 6/16/2024 at 6:27 AM, kiynox said:
if STM0 ~= nil then
	STM0[1].value = math.random(175, 177)
	STM0[2].value = math.random(1, 5)
	STM0[3].value = math.random(-5, 5)
	gg.setValues(STM0)
end

im getting same problem @kiynox

Screenshot_2024-06-18-00-26-48-40_07f20907771ad09ffa2dcbecf65bb740.jpg

Screenshot_2024-06-18-00-26-12-78_83166ce233f71d89e25cf5d6e9762e36.jpg

  • 0
Posted

one cant fix a problem without knowing the source of the problem.

on surface the problem might be clear as a daylight but sometime other source can be related to it and causing the initial problem.

it looks like just a part from a full script as someone suggest above.

if someone else wrote it, you can ask them directly to fix it.

if not then you just copy paste but dont know whats you're doing and hoping it will work.

details matter sometime.

thats why a fix given above didnt worked.

  • 0
Posted

[ @notzagred ]
---
You should put this:

if STM0 ~= nil then

It checks if "STM0" is NOT empty, then execute the command inside the else-if block.
---

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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.