Posted 09 July 2014 - 09:16 AM
Hi there again!
And here i am, again with a crazy problem or maybe its a glitch?
Ok so what im on:
Working 100%.
But when i do something like:
All its showing is 'Welcome on our server!', and line below 'NEWS: '
No news are loading, why?
edit: when i changed to "m.write(tostring(news))" it shows "nil" ?!
And here i am, again with a crazy problem or maybe its a glitch?
Ok so what im on:
Spoiler
local news_handle = http.get("http://94.23.248.33/skyblock/news.txt")
if not news_handle then
news = "Cant load any news from server"
else
local news = news_handle.readAll()
news_handle.close()
end
print(news)
Working 100%.
But when i do something like:
Spoiler
m = peripheral.wrap("back")
m.clear()
term.redirect(m)
m.setTextScale(1)
m.setCursorPos(1,1)
m.setTextColour(512)
local news_handle = http.get("http://94.23.248.33/skyblock/news.txt")
if not news_handle then
news = "Cant load any news from server"
else
local news = news_handle.readAll()
news_handle.close()
end
m.setTextColour(colors.orange)
m.setCursorPos(16,7)
m.write("Welcome on our server!")
m.setTextColour(1)
m.setCursorPos(15,10)
m.write("NEWS: ")
m.setTextColour(32)
m.write(news)
All its showing is 'Welcome on our server!', and line below 'NEWS: '
No news are loading, why?
edit: when i changed to "m.write(tostring(news))" it shows "nil" ?!
Edited on 09 July 2014 - 07:18 AM