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

[Question] How do I create an API in SMP?

Started by Creeper_rippeR, 06 May 2012 - 08:09 PM
Creeper_rippeR #1
Posted 06 May 2012 - 10:09 PM
Hello.
I've found lots and lots of tutorials on how to write API's but all of them are for sp as they all refer to .minecraft\… and none for SMP which got me wondering if they work on SMP but they don't cause I've already checked. I may be doing something wrong.
I have CC 1.33 for MC 1.2.5 and I extracted the contents of the zip file for servers directly into minecraft_server.jar and in there I couldn't find any proper folder to write an API.
digpoe #2
Posted 06 May 2012 - 10:17 PM
You can write APIs in SMP, but you need to be hosting the server, because you will need to access the files of the computer in the mod, which is: yourservermodsComputerCraftluaromapis
MysticT #3
Posted 06 May 2012 - 11:14 PM
You don't have to put the API file in the rom folder, but if you don't you have to load it with os.loadAPI(). Just create the file with the API functions, and just add

os.loadAPI("path/to/your/api")
at the top of the programs that use it.

Also
I have CC 1.33 for MC 1.2.5 and I extracted the contents of the zip file for servers directly into minecraft_server.jar and in there I couldn't find any proper folder to write an API.
You don't have to put the files in the jar, they go in the mods folder.
Creeper_rippeR #4
Posted 11 May 2012 - 07:38 AM
Thank you very much.