This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Crucidal's profile picture

what happened to the good old rednet?

Started by Crucidal, 03 February 2015 - 06:04 PM
Crucidal #1
Posted 03 February 2015 - 07:04 PM
Hi,

I'm currenly playing the newest version of resonant rise.
I believe the ATlauncher claims I'm on CC 1.6.5. but ingame it says CraftOS 1.6.
Now I'm not sure whether those two version numbers are normally equal (meaning I'm actually on 1.6)
ut at least this should give you enough information to teach me something new about my current version :-)


So I was thinking the following: "Wouldn't it be nice if my turtles could request a refuel via netsend.announce() so that they never run out of fuel?"
As you might have guessed, I ran into a bit of a problem… because the old rednet functions deprecated… I've got no clue how to achieve something similar now.

Can I parse the chat messages from the chat program located in /rom/programs/rednet? Should I use HTTP?
I don't want to run another server just to handle my HTTP requests unless it can be done ingame.


Besides information on how to tackle this problem I'd also like to know why the old functions deprecated… they were so simple to understand :'-(

greetings,
Crucidal
Lignum #2
Posted 03 February 2015 - 07:18 PM
They're not.
Crucidal #3
Posted 03 February 2015 - 07:28 PM
derp.
I tried to call rednet as a program… and of course it said "rednet is not a program"

well… thanks… this can be closed I guess ^^"
Bomb Bloke #4
Posted 03 February 2015 - 10:47 PM
I believe the ATlauncher claims I'm on CC 1.6.5. but ingame it says CraftOS 1.6.
Now I'm not sure whether those two version numbers are normally equal (meaning I'm actually on 1.6)
ut at least this should give you enough information to teach me something new about my current version :-)

All versions of CC 1.5x will report themselves as CraftOS 1.5, all versions of CC 1.6x will report themselves as CraftOS 1.6, and so on.

Which is rather annoying, because CC 1.65 has functions that CC 1.6 doesn't, and you can't use the CraftOS version number to determine if they're present… making os.version() less useful than, say, manually checking if whatever functions you want are there.
Edited on 03 February 2015 - 09:47 PM
Lignum #5
Posted 04 February 2015 - 03:40 PM
Which is rather annoying, because CC 1.65 has functions that CC 1.6 doesn't, and you can't use the CraftOS version number to determine if they're present… making os.version() less useful than, say, manually checking if whatever functions you want are there.

Well, I doubt that that's what the version number is intended for. I find it much neater to just check whether the feature exists or not than write some strange, messy piece of code to filter out the version number from os.version. However, I do agree with more detailed version numbers in order to be easily able to tell what exact version of CC you're on.