Jump to content
GameCrasher

How do I add text files using lua?

Recommended Posts

I want to create a text file using lua but I'm not sure how.

Share this post


Link to post
Share on other sites

Posted (edited)

How do I add text files using lua?

In lua GG:

*.txt its load address.

*.lua its script.

*.lasm its script Disassemble.

*.* Its custom.

So what do you want?

 

Edited by HEROGAMEOfficial

Share this post


Link to post
Share on other sites
On 5/18/2020 at 4:30 AM, HEROGAMEOfficial said:

How do I add text files using lua?

In lua GG:

*.txt its load address.

*.lua its script.

*.lasm its script Disassemble.

*.* Its custom.

So what do you want?

 

I want to find out how I can create a new text file using a gg .lua code

Share this post


Link to post
Share on other sites

Same as using not gg .lua code. It is common task task Lua related. Use google for find answer.

Share this post


Link to post
Share on other sites

io.open(your path,"w"):write(anything you want to write)

eg:

io.open("/sdcard/Download/Newfile.txt","w"):write("This is a new file created by the script.")

Share this post


Link to post
Share on other sites
11 hours ago, GameCrasher said:

I want to find out how I can create a new text file using a gg .lua code

1. Data = io.open("/sdcard/file.lua", "w"):write("This text in your file")

2. Data = io.open("/sdcard/file.lua", "w")

Data:write("This text your file")

If finish you can close.

Data:close()

3. gg.saveVariable({"Your text in here."}, "/sdcard/file.lua")

Share this post


Link to post
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

  • Similar Content

    • By MrXnuv3r
      help me to find more than one value
      I mean, if I look for the value "25" and there are no results, then continue to look for the second value "20".
      but if I look for the value "25" and there are results, then don't look for the second value "20"
      I tried writing the script but GG always read i search value "5"
      sorry for my english
      I hope you understand what I mean
       
    • By Nothin2cee
      I've been using game guardian to modify values in Tap Sports Baseball for a couple years now, the security has gotten better and better since I started including flagging for certain virtual spaces (parallel, xposed, calc). We figured out that vmos would work so we used that and the code was the same as always.
      Now parallel space works again and its a much better app than vmos but for some reason the code in PS is different than vmos. I believe this is due to 32 bit vs 64 bit? But I'm no expert.
      Why would the code change like this? In vmos it uses mainly dword (99% of the time) but in PS we are getting more qword results as well as additional lines of code (127D) where there never used to be code.
       
      Any insight would be appreciated!
    • By DeSlimsteMan
      Hello,
      How do I script for a search of a hex value that the beginning of the hex and the end is always the same but the middle changes everytime the game opens.
      Example 0000007F697F1E98 0000007F697C9E98 0000007F69148E98
      That's the same value I need to find, each one is from opening the game again, as you can see the begining and ending remain the same but the middle digits change.
      Is there a way to search for 0000007??????E98h
      And what do the colors mean?
      When I GOTO and browse the hex values are mostly white text but some are yellow or purple or red.

      Thanks in advance!
    • By DeSlimsteMan
      Hello,
      I would like to script an alert that shows target info such as the version name AND uid AND other info.
      And also enter my own 'text' all in the same alert. (Because targetinfo is not labeled)
      So far I can do this:
      about = gg.getTargetInfo() gg.alert(about.versionName) It works perfect, but how do I get more target info into the same alert, and how to enter my own 'text'?
      What I would like to do for example:
      ALERT Version - (versionName) UID - (uid)
      In one alert message...
      Sorry I just really hope this makes sense.
      Thank you for your help and please explain like telling a beginner hahaha😆
×
×
  • Create New...