Jump to content

Question

Posted (edited)

I want to make my script detect if there a saved item on game guardian saved list without getting error how?

Hope anyone help me with some small lines of code or anything

Edited by Coolboy263

10 answers to this question

Recommended Posts

  • 0
Posted

Nothing helped me please say to me where i need to read in help page or type some code i really need it to my script

Screenshot_20200615-144831_Chrome Beta.jpg

[added 3 minutes later]
3 hours ago, Enyby said:

Read API help.

[added 0 minutes later]

https://gameguardian.net/help/

 Nothing helped me please say to me where i need to read in help page or type some code i really need it to my script

  • 0
Posted

I want to make my script detect if there a saved item on game guardian saved list without getting error how?

Hope anyone help me with some small lines of code or anything

Nothing in help page helped me

  • 0
Posted
19 minutes ago, MonkeySAN said:

can show me how you write it in the script that get you error?

I tryed something like

F = gg.getListItems()

If f[1].address == nil then print('hi') end

Also this didt work

If gg.getListItems == nil then print('hi') end

  • 0
Posted
F = gg.getListItems() <-- why use big F here...

If f[1].address <-- but call small f here 
  == nil then print('hi') end


-- use same big/small for both

 

  • 0
Posted (edited)
5 minutes ago, MonkeySAN said:

F = gg.getListItems() <-- why use big F here...

If f[1].address <-- but call small f here 
  == nil then print('hi') end


-- use same big/small for both

 

If i use small F or big f nothing changes the error is not F or f

This lines of code is not working i tryed to do all things i get error or it dont work

Also if dont know this lines of code will give you error if there is no saved item

Edited by Coolboy263
  • 0
Posted
6 hours ago, Coolboy263 said:

If i use small F or big f nothing changes the error is not F or f

This lines of code is not working i tryed to do all things i get error or it dont work

Also if dont know this lines of code will give you error if there is no saved item

Can you send the picture of the error it gives? 

  • 0
Posted

If i type this 

d = getListItems
if d[1] == nil then print('hi') end

Or if d[1].address == nil rhen print('hi') end

 

I get this error message

Screenshot_20200616-101747_Chrome Beta.jpg

  • 0
Posted

Just check if table returned by "getListItems" function contains any elements.

local t = gg.getListItems()
if #t == 0 then
  print('Saved list is empty')
else
  print('Saved list is not empty')
end

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.