599 posts
Location
LeLua
Posted 02 August 2015 - 07:49 PM
CraftNet
This is a little code example of how you can make Internet using computercraft.
This is very basic and would need to code auto server finders and such.
Hope to hear your thoughts on this.
599 posts
Location
LeLua
Posted 02 August 2015 - 08:00 PM
And if you really want to make GOOGLE on this CraftNet, you could loop through numbers, and send a pact for example:
CraftNetMsg.IsServer="3"
CraftNetMsg.IsServerOK="3_5"
while true do
if msg==CraftNetMsg.IsServer
rednet.send(sender, CraftNetMsg.IsServerOK)
end
end
Edited on 02 August 2015 - 06:01 PM
1140 posts
Location
Kaunas, Lithuania
Posted 02 August 2015 - 08:51 PM
In the tutorial subforum we expect people to not only give some code, but actually explain what it does. You should really write a description, an actual tutorial, about what you're trying to teach here.
8543 posts
Posted 02 August 2015 - 11:52 PM
Moved to Programs.
599 posts
Location
LeLua
Posted 03 August 2015 - 07:27 AM
Code is explained. I commented it.
818 posts
Location
Wherever you want me to be
Posted 03 August 2015 - 07:44 AM
you just need to edit the comment explaining it though, you did:
if (statement)
and not:
if (statement) then
also a tip you might want to know, you don't need string.len.
you can just do a simple #, but its not like it really matters.
just a tip :)/>
--instead of:
txt = "hi"
print(string.len(txt))
--you can do
txt = "hi"
print(#hi)
Edited on 03 August 2015 - 05:47 AM
599 posts
Location
LeLua
Posted 03 August 2015 - 08:21 AM
Yes _Wait, I know that, but I dont use it very often one of the reasons why is I forget about it :D/>