pakez
|
  |
| Joined: 17 Dec 2012 |
| Total Posts: 11 |
|
|
| 25 Dec 2012 12:24 AM |
say i have the following in a notepad.txt file:
apple orange banana
is it possible to read *.txt files and translate it into a table like this:
lines = {"apple", "orange", "banana"}
or is RBLX.lua just so limiting once again. |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2012 12:32 AM |
local lines = {}
for line in io.open("notepad.txt", "r"):lines() do table.insert(lines, line) end
But the io library doesn't exist in Roblox. |
|
|
| Report Abuse |
|
|
|
| 25 Dec 2012 12:33 AM |
| because the users of a children's game should be able to access their friend's computer |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 25 Dec 2012 12:36 AM |
It is possible to do what you asked.
1. Create .txt file with data "apple orange bannana" 2. Create a RBX::Lua script 3. Read the .txt file and copy each line into the script formatted as a RBX::Lua table 4. ??? 5. Profit |
|
|
| Report Abuse |
|
|
pakez
|
  |
| Joined: 17 Dec 2012 |
| Total Posts: 11 |
|
|
| 25 Dec 2012 12:44 AM |
im talking about reading a *.txt file in the same folder a plugin *.lua script is located in.
also waffle you are no help. |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 25 Dec 2012 01:17 AM |
| The os/io libraries do not EXIST in RBX::Lua. No matter what. |
|
|
| Report Abuse |
|
|
SN0X
|
  |
| Joined: 24 Oct 2011 |
| Total Posts: 7277 |
|
|
| 25 Dec 2012 04:25 AM |
| tehy pressed delete on the io file qq |
|
|
| Report Abuse |
|
|