ATG
Junior Member
Posts: 79
|
Post by ATG on Aug 20, 2020 12:51:21 GMT
Hi,
Can some one please show me how to read a file and capture the number of first line only?
*the text file only contain one number only.
|
|
|
Post by Mercobots on Aug 20, 2020 15:31:37 GMT
|
|
ATG
Junior Member
Posts: 79
|
Post by ATG on Aug 20, 2020 21:35:28 GMT
Thanks Mercobots.. I did a lot of searching too.. probably I 've missed out part of that solution.
I got a solution.
Looks simple and straight forward
readLog = io.open(scriptPath().."abc.txt", "r") data = readLog:read() io.close(readLog) print(data) That was the last bit, I finally created a fully fledged bot for my game, handle game crashed and restart. SUPER HAPPY!!!!
|
|