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 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😆
    • By Roller4
      I have been playing roller coaster tycoon touch and I can easily duplicate rides by placing them and storing them but there are ride skins that change how the rides look. I can not click on them as they are locked. Any ideas on how to unlock them?
    • By ILoveGameGuardian213
      Hi, I know how to change the value but it's visual only, and if I buy things the game will restart. Any help? (My device is rooted by KingRoot)
×
×
  • Create New...