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

TurtleMagic Keeps saying no such program

Started by Mints, 10 October 2012 - 07:39 PM
Mints #1
Posted 10 October 2012 - 09:39 PM
Hi, I've installed turtlemagic on my server in mods/ComputerCraft/lua/rom/apis/turtle as mt, but whenever i try to do setPos() it keeps saying no such program anyone know why?
jag #2
Posted 10 October 2012 - 11:07 PM
What is turtlemagic? Could you add a link?
Mints #3
Posted 10 October 2012 - 11:12 PM
http://www.computercraft.info/forums2/index.php?/topic/1871-magicturtle-v138-pathfinding-mapping-exploration/

Sorry i meant magic turtle, got it the wrong way around.
Lyqyd #4
Posted 10 October 2012 - 11:22 PM
Hi, I've installed turtlemagic on my server in mods/ComputerCraft/lua/rom/apis/turtle as mt, but whenever i try to do setPos() it keeps saying no such program anyone know why?

Are you calling it as mt.setPos()? Are you trying to call this directly from the shell?
jag #5
Posted 10 October 2012 - 11:25 PM
Well that is an API, so if you do a script you'll have to load the API using os.loadAPI().
So in your program you do

os.loadAPI("rom/apis/turtle/mt")
mt.setPos()
This should work better for you!
Mints #6
Posted 10 October 2012 - 11:26 PM
I'm calling it from the turtle shell and i've tried mt.setPos() it says no program exists.

Well that is an API, so if you do a script you'll have to load the API using os.loadAPI().
So in your program you do

os.loadAPI("rom/apis/turtle/mt")
mt.setPos()
This should work better for you!

I'll try this and ill let you know how it goes.
Mints #7
Posted 10 October 2012 - 11:29 PM
I'm calling it from the turtle shell and i've tried mt.setPos() it says no program exists.
Well that is an API, so if you do a script you'll have to load the API using os.loadAPI(). So in your program you do
 os.loadAPI("rom/apis/turtle/mt") mt.setPos() 
This should work better for you!
I'll try this and ill let you know how it goes.

Still says no such program for some reason.
jag #8
Posted 10 October 2012 - 11:30 PM
I'm calling it from the turtle shell and i've tried mt.setPos() it says no program exists.

Well that is an API, so if you do a script you'll have to load the API using os.loadAPI().
So in your program you do

os.loadAPI("rom/apis/turtle/mt")
mt.setPos()
This should work better for you!

I'll try this and ill let you know how it goes.
Oh, well you cant run it within the shell.
It's an API.

If you anyway want to run it you'll have to do
(in the shell, not in a program)
either this
cd rom/apis/turtle
mt
Otherwise this works too

rom/apis/turtle/mt
Mints #9
Posted 10 October 2012 - 11:31 PM

For more information of what im tpying in.
Mints #10
Posted 10 October 2012 - 11:34 PM
Just redownloaded the API to fix that error but when i do mt.setPos it still says No such program.
jag #11
Posted 10 October 2012 - 11:36 PM
Wow, no!
I guess you are new to computercraft.

To make this clear, you are in the shell right now (on the picture).
But to edit/create a program you
edit programName

Do you even got a program?
Mints #12
Posted 10 October 2012 - 11:40 PM
I am trying to get the API to work not create a program.
MysticT #13
Posted 10 October 2012 - 11:43 PM
But the api is to use in a program :P/>/>
Mints #14
Posted 10 October 2012 - 11:46 PM
Well, I am using the turtle shell and I'm not sure how to call the api via a program and it won't save the program in the turtle shell as it says access denied.
Mints #15
Posted 11 October 2012 - 12:03 AM
Maybe if i rephrase it. How can i create a program which uses the magic turtle API?
jag #16
Posted 11 October 2012 - 12:11 AM
Step 1: Make a file!
On your shell type "edit" (without the quotes) followed by the name of your program.

Step 2: Code the program!
When you open the program with "edit" you can now write in it, as if it where a text editor!
Now type this in your program:
os.loadAPI("rom/apis/turtle/mt")
mt.setPos()

Step 3: Save and exit!
Press CTRL to enter the menu at the bottom. Once you are at the menu you select "Save" and press enter.
Do this again but this time select "Exit".

Step 4: Run your program!!
When you close the text editor you will get back to the shell.
Here you are now going to type in the name of your program and press enter!

And voila! You just made a program!!
Mints #17
Posted 11 October 2012 - 12:12 AM
Step 1: Make a file!
On your shell type "edit" (without the quotes) followed by the name of your program.

Step 2: Code the program!
When you open the program with "edit" you can now write in it, as if it where a text editor!
Now type this in your program:
os.loadAPI("rom/apis/turtle/mt")
mt.setPos()

Step 3: Save and exit!
Press CTRL to enter the menu at the bottom. Once you are at the menu you select "Save" and press enter.
Do this again but this time select "Exit".

Step 4: Run your program!!
When you close the text editor you will get back to the shell.
Here you are now going to type in the name of your program and press enter!

And voila! You just made a program!!

And if i try to save in the turtle shell it says access denied.
jag #18
Posted 11 October 2012 - 12:17 AM
Well that's just something weird with either your installation or your version of computercraft…
MysticT #19
Posted 11 October 2012 - 12:18 AM
You are probably trying to save it to the rom. Use a diferent path.
jag #20
Posted 11 October 2012 - 12:19 AM
Or yeah, what mystic said
Mints #21
Posted 11 October 2012 - 12:22 AM
Ok i made the program you told me to jag, but it still says you need to set your position with setPos which i've done in the program (its the one you wrote.)
Mints #22
Posted 11 October 2012 - 12:46 AM
Well, I've still not figured out why it won't accept my program for setting the position of the turtle.
anonimo182 #23
Posted 11 October 2012 - 01:05 AM
Type this in your computer:

edit test --replace test with wathever you want
os.loadAPI("mt") --replace mt with wathever the API is
--And then you type the code you want!
--After that, press Ctrl, and press enter
--Then press Ctrl again, press the right key and press enter
--Then Run this program!!!
Mints #24
Posted 11 October 2012 - 01:26 AM
anonimo, thats basically what jag said on last page… I've tried that already.
anonimo182 #25
Posted 11 October 2012 - 02:59 AM
–Type lua
–Type os.loadAPI("whatever-part-is-the-API")
–Type the function!
Mints #26
Posted 11 October 2012 - 03:15 AM
Ok, when i try that it says file not found.
jag #27
Posted 11 October 2012 - 09:23 AM
Ok i made the program you told me to jag, but it still says you need to set your position with setPos which i've done in the program (its the one you wrote.)
Well you'll have to give the function the right parameters, I just gave an example.

When I'm looking at the MagicTurtle API it says that it's a simple way of handling your gps system.
And if you got it setup properly then you can pathfind.

So I don't know what you where looking for when you got this API, and that you don't even know how to use a API..

Could you just tell us what you need this API (MagicTurtle) for?