Jump to content

2 Screenshots


User Feedback

Recommended Comments

Count_Nosferatu

Posted

GG: 101.1 (16142); Android: 7.1.2 (25) [su]

/sdcard - prohibited write

And error on screenshot

2024-10-31 11_03_08-Nox AND 7 x64 my acc..png

TdLove

Posted

try switching devices

Count_Nosferatu

Posted

  On 10/31/2024 at 7:50 PM, TdLove said:

try switching devices

Expand  

Switching or changing device?
If switching, then to what?
Or specify on which devices your script works.

TdLove

Posted

  On 11/1/2024 at 1:25 AM, Count_Nosferatu said:

Switching or changing device?
If switching, then to what?
Or specify on which devices your script works.

Expand  

download the new version

Count_Nosferatu

Posted

  On 11/2/2024 at 2:43 AM, TdLove said:

you can try 'alert'.

Expand  

I can, but I'm not interested in the result of your script.
I'm interested in why your script crashes on GG downloaded from this site.
I tried it on four devices, three rooted, one with a virtual machine.
GG: 101.1 (16142); Android: 7.1.2 (25) [su]
GG: 101.1 (16142); Android: 9 (28) [su]
GG: 101.1 (16142); Android: 10 (29) [io.va.exposed]
GG: 101.1 (16142); Android: 12 (32) [su]
The same error on all devices:
`io.open(file,"w+"):write("{")`
attempt to index ? (a nil value) with key 'write'

I suspect that you are using a modified GG, and you don't write about it.

CmP

Posted

  On 11/2/2024 at 9:05 AM, Count_Nosferatu said:

I tried it on four devices, three rooted, one with a virtual machine.

Expand  

Maybe just because "Notes" directory doesn't exist in "/sdcard" on devices where you tested?

Count_Nosferatu

Posted (edited)

  On 11/2/2024 at 1:33 PM, CmP said:

Maybe just because "Notes" directory doesn't exist in "/sdcard" on devices where you tested?

Expand  

Of course this folder is missing.
But the problem is that the official GG doesn’t understand the syntax
io.open(file,"w+"):write("{")`
And it is better to save the file in the same place as your script.
This is how it is understood:

...
local json_info,file_nam,file,path,_
json_info=TdLove.ParseResults(TdLove,result)
if gg.alert("Alert or Write","write","alert")==1 then
    path = (gg.getFile():match("^(.*)[/\\][^/\\]*$").."/")
    file_name=path..gg.getTargetPackage()..".js"
    file = io.open(file_name,"w")
    io.output(file) io.write('{') io.close(file)
end
file = io.open(file_name,"a") io.output(file)
for iii,kkk in ipairs(json_info) do
    _=(iii~=#json_info and ",\n" or "\n")
    io.write("\n{\n\""..iii.."\":\n"..kkk.."\n}".._)
end
io.write("\n}") io.close(file)
...

And some other little things:

...
local gg=gg
gg.clearResults()
gg.setVisible(false)
menu()
gg.clearResults()
gg.setVisible(true)

 

Edited by Count_Nosferatu
CmP

Posted

  On 11/2/2024 at 10:45 PM, Count_Nosferatu said:

But the problem is that the official GG doesn’t understand the syntax

Expand  

And what's wrong with the syntax? Tried specifying path where it can create file before concluding that it's syntax issue?

Count_Nosferatu

Posted

  On 11/2/2024 at 11:21 PM, CmP said:

Tried specifying path where it can create file before concluding that it's syntax issue?

Expand  

Of course.

In any case, the open file must be closed.

CmP

Posted (edited)

  On 11/3/2024 at 12:40 AM, Count_Nosferatu said:

the open file must be closed

Expand  

Right, but if it is not done, it will happen automatically once the script completes. It's not related to the error that you got, it was because file can't be created in specified path, so "io.open" returns nil and then it is indexed with "write" key, which is the error from your screenshot.

For example, you can try the following code and check contents of the file after running it: 

local path = "/sdcard/test.txt" -- Change to any other path to file that can be written
io.open(path, "w+"):write("123")
Edited by CmP
Mikey-GG

Posted

  On 11/3/2024 at 12:40 AM, Count_Nosferatu said:

Of course.

In any case, the open file must be closed.

Expand  

You are Right,Bro.. it doesn't Save Also, he should make Script that can open malformed Json .

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.