--(C)2013 14Studios interRed
function clear( x,y )
term.clear()
term.setCursorPos(x,y)
end
function c()
clear(1,1)
end
rednet.open("back")
clear(17,1)
write("Welcome to the InterRed System")
print("")
write("ID Hookup: ")
idHookup = read()
clear(17,9)
print("Loading...")
sleep(.5)
rednet.send(idHookup, "receivePacketID")
recPacket = rednet.receive()
c()
print(recPacket)
ERROR: Rednet 53: Expected Number
Started by ebernerd, Jun 19 2013 09:17 PM
7 replies to this topic
#1
Posted 19 June 2013 - 09:17 PM
So, I am trying to make my own "internet" for advertising on my tekkit server. What am I doing wrong here? The server program (on a different computer) is alright. So, what is wrong? [ps. both programs are running]
#2
Posted 19 June 2013 - 09:20 PM
recPacket = rednet.recieve() --Try using this instead id, recPacket = rednet.recieve()
#4
Posted 19 June 2013 - 09:32 PM
I have noticed that it isnt even sending the request for a packed ID. So, the rednet message never gets sent
#5
Posted 19 June 2013 - 09:47 PM
read() returns a string, rednet.send requires a number. Try tonumber(read()). But remember that you've gotta check for the user error of entering non-numbers but checking if tonumber returns nil.
local idHookup -- also, learn about locals and use them. They are faster and safer. repeat idHookup = tonumber(read()) until idHookup
#6
Posted 20 June 2013 - 12:20 AM
ElvishJerricco, on 19 June 2013 - 09:47 PM, said:
read() returns a string, rednet.send requires a number. Try tonumber(read()). But remember that you've gotta check for the user error of entering non-numbers but checking if tonumber returns nil.
local idHookup -- also, learn about locals and use them. They are faster and safer. repeat idHookup = tonumber(read()) until idHookup
#8
Posted 20 June 2013 - 05:27 AM
Thanks so much guys! I fized it! Wanted to make an advertisement system for my tekkitserver
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











