Jump to content
  • 0

how to use  gg.internal3()


Question

6 answers to this question

Recommended Posts

  • 0
Posted

I think this is a check of argument type, if it integer is true, if not then an error.

print(gg.internal3(0))
--> true

print(gg.internal3(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
--> true

print(gg.internal3(2023))
--> true

print(gg.internal3(Zanzibar))
--> Error
--> ..
--> `print(gg.internal3(Zanzibar))`
--> bad argument #1: nil: int expected, got nil (field 'internal3')
--> ..

 

  • 0
Posted

This function has been later made available as part of GG public APIsearchPointer. "gg.internal3" and "gg.searchPointer" are exactly the same function, it's just that it was first an experiment, so started as internal function. By the time of last update of chainer script, "searchPointer" function hasn't existed yet, that's why it isn't used there.

  • 0
Posted

I recommend you to grab jadx (or other similar tool) and check how those functions are implemented in GG. There you will also find confirmation that "gg.internal3" and "gg.searchPointer" do exactly the same. If there will be difficulties, ask here or in new topic.

  • 0
Posted
15 hours ago, CmP said:

I recommend you to grab jadx (or other similar tool)

Thanks for the advice, but dealing with decompiled programs is not my thing.
It's easier for me to look at errors when running scripts. 😀

gg.internal1(1122)
results like execute gg.searchNumber(':1122',, gg.TYPE_BYTE, false, gg.SIGN_EQUAL, 0, -1, 0)

gg.internal1(0xFFFF)
results like execute gg.searchNumber(':65536',, gg.TYPE_BYTE, false, gg.SIGN_EQUAL, 0, -1, 0)

gg.internal1('qwerty')
results like execute gg.searchNumber(':qwerty',, gg.TYPE_BYTE, false, gg.SIGN_EQUAL, 0, -1, 0)

gg.internal1(qwerty))
Error ..`
bad argument #1: nil: string expected, got nil (field 'internal1')
..


gg.internal2()
Error...
bad argument #1 to 'gg.internal2' (no value: closure expected, got nil) (field 'internal2')
...
gg.internal2(100)
Error...
bad argument #1 to 'gg.internal2' (number: closure expected, got number) (field 'internal2')
...
gg.internal2(nil)
Error...
bad argument #1 to 'gg.internal2' (nil: closure expected, got nil) (field 'internal2')
...
gg.internal3(true)
Error...
bad argument #1: boolean: int expected, got boolean (field 'internal3')
...
gg.internal2('qwerty')
Error...
bad argument #1 to 'gg.internal2' (string: closure expected, got string) (field 'internal2')
...

 

  • 0
Posted
On 11/4/2023 at 3:28 AM, CmP said:

This function has been later made available as part of GG public APIsearchPointer. "gg.internal3" and "gg.searchPointer" are exactly the same function, it's just that it was first an experiment, so started as internal function. By the time of last update of chainer script, "searchPointer" function hasn't existed yet, that's why it isn't used there.

ditto, "gg.internal3" and "gg.searchPointer" are exactly the same function. 

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.