Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 9 10 11 12 13 … 18 Next »
IO and compileString issues/broken
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
IO and compileString issues/broken
07-02-2016, 07:38 AM, (This post was last modified: 07-02-2016, 09:01 AM by Red The Blue Color.)
#1
Red The Blue Color Offline
TSCM Super Donating Member
****
Posts: 422
Threads: 34
Joined: Feb 2015
IO and compileString issues/broken
Everytime i try to :read("*a") any file it just errors with
addons/starfall/lua/starfall/libraries/libs_sh/io.lua:592: bad argument #1 to 'StringMatch' (string expected, got nil)

I even got pretty desperate and attempted to use Loc's mainframe since it uses files. Same problem

Reproduce error:

if not files.exists("rtbmf.txt") then
local RawFile = io.open("rtbmf.txt","w")
RawFile:write("test")
RawFile:close()
end
local RawFile = io.open("rtbmf.txt","r")
print(RawFile:read("*a"))

EDIT: compileString() appears to be broken aswell since it just returns nil no matter what happens
[SF - ERROR] SF:rtbctech/RTBMF.txt:532: attempt to call a nil value
compileString("print('test')")()
that error prob isn't helpful but im sure you get the point

"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016

[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
Find
Reply
07-02-2016, 08:39 AM,
#2
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: IO issues/broken
Well i'm not using the read method, I instead use the lines method to read files as Starfall is probably not the best platform for reading files as low level (byte per byte)... And also because I got similar issues with byte per byte reading on standard gmod...
Find
Reply
07-02-2016, 08:59 AM, (This post was last modified: 07-02-2016, 09:04 AM by Red The Blue Color.)
#3
Red The Blue Color Offline
TSCM Super Donating Member
****
Posts: 422
Threads: 34
Joined: Feb 2015
RE: IO issues/broken
(07-02-2016, 08:39 AM)Yuri6037 Wrote: Well i'm not using the read method, I instead use the lines method to read files as Starfall is probably not the best platform for reading files as low level (byte per byte)... And also because I got similar issues with byte per byte reading on standard gmod...

both involve reading so technically you are using a reading method trollface.jpeg Big Grin
I hope you realize that *a means full file not byte per byte

"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016

[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
Find
Reply
07-02-2016, 11:33 AM,
#4
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
RE: IO and compileString issues/broken
Seems you can add Submaterials to the list, Samo's ship isn't saving the ones he's set yet my ships load the submats fine.
EDIT: this problem began after me and Red reloaded #1's map to see the in editor starfall console, i noticed my compileString() returned nil but thought there was a mistake with my code.

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
Reply
07-02-2016, 12:23 PM,
#5
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: IO and compileString issues/broken
Both problems were caused from my changed files not being uploaded correctly. Will be fixed when the server(s) next restart/change map.
Find
Reply
07-02-2016, 01:49 PM,
#6
Yuri6037 Offline
TSCM Member
***
Posts: 216
Threads: 45
Joined: Feb 2015
RE: IO and compileString issues/broken
(07-02-2016, 08:59 AM)Red The Blue Color Wrote:
(07-02-2016, 08:39 AM)Yuri6037 Wrote: Well i'm not using the read method, I instead use the lines method to read files as Starfall is probably not the best platform for reading files as low level (byte per byte)... And also because I got similar issues with byte per byte reading on standard gmod...

both involve reading so technically you are using a reading method trollface.jpeg Big Grin
I hope you realize that *a means full file not byte per byte

Oh ok well I did not know what *a means all file. I'm not programing much lua anyways. I'm better when you speak about file reading in C.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.