Jump to content
  • 0

Add to value, do not replace scripting help


David1484

Question

Hi, I've been trying to get this script to work but I have no luck. It's quite a simple script although I don't know why it isn't working. All I want to do is add 10 to the the values I already have in my results. I recorded it aswell but no luck. 

-- Script generated by GameGuardian 99.0 (16126) at 2020-12-14 14:09:52 for Nova Launcher [com.teslacoilsw.launcher 6.2.18 (62018)]
-- Lua help: http://gameguardian.net/help/

-- options
local scriptName = [=====[Script for Nova Launcher 6.2.18]=====]
local scriptVersion = '1.0.0'
local scriptAuthor = 'User'
local startToast = ''
-- 0 - no check; 1 - check package only, 2 - check package and build
local checkTarget = 0

local targetName = [=====[Nova Launcher]=====]
local targetPkg = 'com.teslacoilsw.launcher'
local targetVersion = [=====[6.2.18]=====]
local targetBuild = 62018

-- functions

-- init
gg.require('99.0', 16126)

if startToast ~= '' then startToast = '\n'..startToast end
gg.toast(scriptName..' v'..scriptVersion..' by '..scriptAuthor..startToast)

if checkTarget ~= 0 then
	local info = gg.getTargetInfo()
	local check = false
	local current = false
	if checkTarget >= 1 then
		check = targetPkg
		current = info.packageName
	end
	if checkTarget >= 2 then
		check = check..' '..targetVersion..' ('..targetBuild..')'
		current = current..' '..info.versionName..' ('..info.versionCode..')'
	end
	if check ~= current then
		gg.alert('This script for "'..targetName..'" ['..check..'].\nYou select "'..info.label..'" ['..current..'].\nNow script exit.')
		os.exit()
	end
end
local revert = nil

-- main code

revert = gg.getResults(100000, nil, nil, nil, nil, nil, nil, nil, nil)
local t = gg.getResults(100000, nil, nil, nil, nil, nil, nil, nil, nil)
for i, v in ipairs(t) do
	if v.flags == gg.TYPE_FLOAT | 1073741824 then
		v.value = v.value + "10"
	end
end
gg.addListItems(t)
t = nil

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Archived

This topic is now archived and is closed to further replies.

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