Jump to content

LUA scripting


Enyby
 Share

Recommended Posts

  • Administrators
3 hours ago, nashnie29 said:

Is there a way to remove a specific item(s) from save list? 

gg.removeListItems()

3 hours ago, nashnie29 said:

gg.removeListItems() will remove all the save list items 

Wrong. Read API help.

Link to comment
Share on other sites

18 hours ago, nashnie29 said:

Is there a way to remove a specific item(s) from save list? 

gg.removeListItems() will remove all the save list items

Thanks

Make a table of the values you want to remove from the list and make that the parameter of gg.removeListItems(). 

 

Link to comment
Share on other sites

31 minutes ago, MCbearbear said:

Make a table of the values you want to remove from the list and make that the parameter of gg.removeListItems(). 

 

Thank you sir. thats what im trying to do. it just the address will changed every start of the game so the saved item with the old address needed to be removed .anyway i have PMed you. 

Link to comment
Share on other sites

  • Administrators
7 minutes ago, nashnie29 said:

the address will changed every start of the game

Then saved list useless.

If saved list also auto rebase - you can make some names for desired values, and find it in loaded list. Load all values from it, iterate over result with check name, if name match - build new table for remove this values from saved list.

Link to comment
Share on other sites

27 minutes ago, Enyby said:

Then saved list useless.

If saved list also auto rebase - you can make some names for desired values, and find it in loaded list. Load all values from it, iterate over result with check name, if name match - build new table for remove this values from saved list.

thats the problem. so the only way is your suggestion which I havent done yet. I was trying to load and iterate the old saved address with name check if true, load it to a new table for remove. thanks sir enyby

Link to comment
Share on other sites

1 hour ago, Enyby said:

Then saved list useless.

If saved list also auto rebase - you can make some names for desired values, and find it in loaded list. Load all values from it, iterate over result with check name, if name match - build new table for remove this values from saved list.

Fixed now.

Thanks Eneby and MCbearbear

Edited by nashnie29
cant find the edit button from my prev post sorry
Link to comment
Share on other sites

If you know how to make this command, then give yourself guidance and a sample of which you refer to

[removeResults] = function: removeResults / * gg.removeResults (result table) -> true || string with error * / 

Remove items from the list of results found. Each list item must be a table with address and flag fields (one of the TYPE_ * constants).

Link to comment
Share on other sites

5 minutes ago, TisNquyen said:

If you know how to make this command, then give yourself guidance and a sample of which you refer to

[removeResults] = function: removeResults / * gg.removeResults (result table) -> true || string with error * / 

Remove items from the list of results found. Each list item must be a table with address and flag fields (one of the TYPE_ * constants).

???

Link to comment
Share on other sites

1 hour ago, TisNquyen said:

You know to write this command without error, then you learn

I already fixed my problem using gg.removeListItems(). And your suggestion with gg.removeResults() has nothing to do with what I need to accomplish. Thanks anyway

-----After iterate the table of my SAVED Items------
oldaddress = v.address
break
end
end
a = {}
a[1] = {}
a[1].address = oldaddress
gg.removeListItems(a)
-----the rest of the codes------

 

Edited by nashnie29
added code
Link to comment
Share on other sites

5 phút trước, nashnie29 đã nói:

I have correct your problem by gg .removeListItems (). Your request with gg .removeResults () does not associated what to what to need to execute. Whatever all also thank you

You can help me write a complete script 

I want to learn how to do it 

Edited by TisNquyen
Misspell
Link to comment
Share on other sites

15 minutes ago, nashnie29 said:

gg .removeResults ()

2 minutes ago, nashnie29 said:

Tôi đoán bản dịch dẫn chúng ta đến sự hiểu lầm. hahaha. chắc chắn Im hơn sẵn sàng giúp đỡ?

You can help me do this kind 

gg .removeResults ()

Link to comment
Share on other sites

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
 Share

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