23.12.2015, 22:27
Now I'm unsure how much work this would be. But would it be possible to correct this, Nubzior?
File Loader v1.0
|
23.12.2015, 22:27
Now I'm unsure how much work this would be. But would it be possible to correct this, Nubzior?
Updated! New version in first post. Remember, its only for Linux now, i want to see if crashes still happens with long strings. HammelGammel can u confirm?
12.01.2016, 13:26
That's a little hard to test for me, since I'm using windows
![]()
Ok, version 4 is released, links are in first post. Changes? Fixed readFile function.
14.01.2016, 16:31
(This post was last modified: 14.01.2016, 16:34 by HammelGammel.)
First the good message: Just printing the buffer prints out the full lines now!
Unfortunately it seems now I'm having a few more problems with the fileloader ![]() First of all formatting the string still crashes and concatenation still cuts the string down to 4 letters. buffer.len() will always return 4 btw, even if print(buffer) prints a much much longer string. While string.find works perfectly fine, string.slice gives me "slice out of range", even though I know that the slice is fine. It seems to think that the string only has 4 letters. In this specific example the line in question has about 20 letters: string.find returns me 7. So far so good. But a slice from 0 to 7 is "out of range", and buffer.len() gives me 4. This is really interesting. How can this happen? It seems to be just a normal string (At least type()) tells me so, but something must be different with the string fileRead gives me. Also fileClose gives me extremely weird errors (When it doesn't crash, which most of the time it does) in another file, that just blatantly don't make any sense at all: "Error runtime: the index '_PORTALTEMPEL_RITUAL_04;NW_TROLLAREA_PORTALTEMPEL_' does not exist". The string from the errormessage is a seemingly random part (Not a full line) from the file I am reading in an entirely different part of the code. Removing fileClose fixes it, but I'm assuming it's not a good thing to not close the file. EDIT: Well, most of the time removing fileClose fixes it O.o But not always... It's kind of random. When using fileClose it always happens though. Any ideas what I can do? I could really use some way of reading files, and long lines still cause all kinds of problems for me unfortunately.
30.01.2016, 09:13
New version will be released soon
30.01.2016, 16:26
That's very good news
![]()
09.02.2016, 03:10
(This post was last modified: 28.04.2018, 16:35 by Marko.
Edit Reason: Version 1.0
)
<cenura>
Edit New version released, there is some changes of reading file, jump to first post to see example.
09.02.2016, 20:16
It works!
![]() |
« Next Oldest | Next Newest »
|