Jump to content




Need help generating correct startup script


5 replies to this topic

#1 SigmaChi07

  • Members
  • 3 posts

Posted 01 April 2013 - 07:23 PM

Hello,

I am really new to programming language but have been recently messing around with it. After creating, revising, testing, failing, revising, researching, re-testing, revising, re-testing and finally failing to generate a simple freaking startup script I have turned to the experts.

So, what I am trying to do is just have my turtles turn on automatically when I login/install chunk loader to do the same after server reset.

I researched the os.run API from the wiki and currently have this small script just to run my program but honestly I am not even sure if the last part of the code or any of it actually works for what I need it to do.


> edit Startup
> os.run({}, "rom/programs/Command")

Ctrl > Save
Ctrl > Exit

> reboot
Goodbye

Default turtle text (startup program failed)

There was nothing else on the wiki about if I needed to put an "end" at the bottom or whatnot, but like I said. I just want the darn things to turn on so I don't have to go manually type in the program to 64 mining turtles for my mining barge. :(

Any help would be much appreciated.




#2 superaxander

  • Members
  • 609 posts
  • LocationHolland

Posted 01 April 2013 - 07:55 PM

You first need to clear the screen and you might wanna use shell.run

#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 01 April 2013 - 07:58 PM

Use "startup", not "Startup".

#4 Sora Firestorm

  • Members
  • 89 posts

Posted 01 April 2013 - 08:00 PM

And just to be sure, there IS a program called "Command" in /rom/programs/, right? If not, make sure your command points to a valid program.

#5 Engineer

  • Members
  • 1,378 posts
  • LocationThe Netherlands

Posted 01 April 2013 - 08:36 PM

Note that the programs you save, go to the folder '/'. So combined with the above: shell.run('yourpathtoprogram')

saved in the startup file.

#6 SigmaChi07

  • Members
  • 3 posts

Posted 02 April 2013 - 05:50 AM

View PostLyqyd, on 01 April 2013 - 07:58 PM, said:

Use "startup", not "Startup".

View PostEngineer, on 01 April 2013 - 08:36 PM, said:

Note that the programs you save, go to the folder '/'. So combined with the above: shell.run('yourpathtoprogram')

saved in the startup file.


Thank you all for replying. These were the two replies I found most helpful in my quest! The original code was mostly fine, but I needed to recreate the file as "startup" not "Startup" and secondly I needed to delete the "rom/programs" part of the code because it did not recognize that as a correct directory path.

Thank you all again it was very much appreciated!

Regards,

Sig





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users