Posted 05 October 2014 - 05:10 AM
Im making a gui for an old nitro program, his tree network. Im making it using bedrock, and i have it simplistic.
I am working on the master server for now, and it was working, but then it stopped.
I want to show the number of servers and routers linked to this server. I had it working with routers alone, but once i added servers, it stopped.
I also want to display the latest messgae sent to the server, and this is displayed much the same way, including how it doesnt work. But it should. Why isnt it.
Code:
I am working on the master server for now, and it was working, but then it stopped.
I want to show the number of servers and routers linked to this server. I had it working with routers alone, but once i added servers, it stopped.
I also want to display the latest messgae sent to the server, and this is displayed much the same way, including how it doesnt work. But it should. Why isnt it.
Code:
program:Run(function()
program:LoadView('main')
rednet.open("top")
local requestid, request = rednet.receive()
processRequest(requestid, request)
while true do
requestid, request = rednet.receive()
processRequest(requestid, request)
program:GetObject('Routers').Text = 'Routers: '..#routers
if #routers == 0 then
program:GetObject('Routers').Text = "Routers: 0"
end
program:GetObject('Servers').Text = 'Servers: '..#servers
if #servers == 0 then
program:GetObject('Servers').Text = "Servers: 0"
end
program:GetObject('Message').Text = 'Latest request: '..request
end
end)