generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Storing raw text on a user's machine

Previous Thread :: Next Thread 
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 08:41 AM
Is there any way at all to store raw, uncompressed text under a unique file name using scripts? Perhaps some sort of log function?
Report Abuse
DrunkerScripter is not online. DrunkerScripter
Joined: 22 Jun 2013
Total Posts: 275
19 Aug 2014 09:17 AM
Hmm, the only function I can think that can store data on the client is Plugin:SetSetting(key, value). However you cannot use it in LocalScripts. So not really is the answer
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 09:20 AM
Not only that, but it doesn't store raw data.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 10:47 AM
There's io.open, but it causes an error within ROBLOX...


local f,err = io.open(file,"w")
if not f then return print(err) end
f:write(string)
f:close()

-- one-liner, the file will be closed by GC
assert(io.open(file, 'w')):write(str)


10:46:11.238 - Workspace.Script:1: attempt to index global 'io' (a nil value)
Report Abuse
maxamations is not online. maxamations
Joined: 22 Dec 2010
Total Posts: 65
19 Aug 2014 11:53 AM
ROBLOX Would have disabled io.read and io.open for security reasons.

Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 12:04 PM
Of course, but I would imagine there has to be some way to store data under ROBLOX directories only.
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
19 Aug 2014 12:13 PM
with corescripts
Report Abuse
coolkillerman109 is not online. coolkillerman109
Joined: 29 Apr 2011
Total Posts: 12
19 Aug 2014 12:13 PM
If you want to store data:
RBXDatabase.com
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 02:09 PM
I need the data to be stored on a user's machine, not on a website.
Report Abuse
oatsssss is not online. oatsssss
Joined: 31 Jul 2014
Total Posts: 170
19 Aug 2014 02:11 PM
Why would you need to store on the machine? The database is the same thing. If you want to store on the machine to make it player specific data, then just throw in the player's username as one of the values.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 02:15 PM
It needs to be on the machine. It has to have a unique file name with uncompressed contents. If neither is possible, you might as well not suggest any alternatives, because this combination is my only option for reasons I am not discussing.
Report Abuse
oatsssss is not online. oatsssss
Joined: 31 Jul 2014
Total Posts: 170
19 Aug 2014 02:22 PM
Suspicious... xD

From everywhere that I'm reading, I'm pretty sure it's not possible probably because it's likely to have potential for malware.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 02:32 PM
Although I just said I wouldn't discuss my intentions, I will tell you that it has nothing to do with malware.
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
19 Aug 2014 02:43 PM
The only reason apart from malware you would want to do this is if there was a program on the user's computer that was supposed to read the file. Any other case you can use data stores or the previously suggested RBXDatabase. In fact even if it is a program you want to read the file you could just send info through httpservice and store the info on your own computer about each player and run the program on your own computer to go to a certain player's file that was saved.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 02:46 PM
Actually no - the file is both read and written to by ROBLOX scripts.
I've already found a good way to read the file, it's just writing one that's stumping me.
Report Abuse
Kodran is not online. Kodran
Joined: 15 Aug 2013
Total Posts: 5330
19 Aug 2014 02:55 PM
So just use data stores and save with the user's name, you're really wasting your time.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 02:56 PM
If I wasn't clear, these are some very strict requirements:
-Files need to be located on user's machine
-Files need to be written to by ROBLOX scripts

Anything other than that simply won't work for me. Just trust me on that.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
19 Aug 2014 02:59 PM
ROBLOX removed io from RBX.Lua.

Frankly, I cannot think of any way you can do this without the user running a program you download onto their PC.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 03:32 PM
Obviously the answer is not clear, or perhaps even nonexistent.
Are there any log or crash report functions that can be used? Maybe HttpService can be used to download temporary files?
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
19 Aug 2014 03:35 PM
LogService?

Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 03:37 PM
That has to do with the output - it's of no use.
Now, about HttpService...
http://wiki.roblox.com/index.php?title=API:Class/HttpService/GetAsync
Where does GetAsync store its cache?
Report Abuse
blockoo is not online. blockoo
Joined: 08 Nov 2007
Total Posts: 17202
19 Aug 2014 03:37 PM
There's no way to explicitly write data to a user's computer with RBX.Lua, simple as that.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 03:48 PM
I'm starting a new thread about that GetAsync question.
Report Abuse
hunte922 is online. hunte922
Joined: 28 May 2008
Total Posts: 6969
19 Aug 2014 05:36 PM
Sadly, GetAsync doesn't store cache like I thought it would.
Report Abuse
nicemike40 is not online. nicemike40
Joined: 19 Dec 2008
Total Posts: 1814
19 Aug 2014 05:41 PM
I'm curious as to how you are reading the files in the first place.

As for writing them, maybe you could send a request to a server outside of roblox and have the server do the writing instead? Just a thought.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image