Jump to content

JsonCodeDumper 1.2

   (0 reviews)

2 Screenshots

 Share


User Feedback

Recommended Comments

5 hours ago, TdLove said:

try switching devices

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

Link to comment
Share on other sites

1 hour ago, Count_Nosferatu said:

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

download the new version

Link to comment
Share on other sites

6 hours ago, TdLove said:

you can try 'alert'.

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.

Link to comment
Share on other sites

4 hours ago, Count_Nosferatu said:

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

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

Link to comment
Share on other sites

9 hours ago, CmP said:

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

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
Link to comment
Share on other sites

35 minutes ago, Count_Nosferatu said:

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

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

Link to comment
Share on other sites

1 hour ago, CmP said:

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

Of course.

In any case, the open file must be closed.

Link to comment
Share on other sites

53 minutes ago, Count_Nosferatu said:

the open file must be closed

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