Jump to content

A Guide on loading custom API's

api computer help

6 replies to this topic

#1 FoxData

  • Members
  • 158 posts

Posted 20 July 2016 - 07:59 PM

This tutorial is mean for beginners only!!!

Starting off
An API is a set of functions to make your programming easier.

An Example: If you want to make a rednet spamming program when you would need to write all the rednet stuff. But with an API installed. You can do all that in a single line

Getting one
Obtaining an API is simple. Just download one from this very forum. Use the pastebin download and once you have the API move on the to next step.

Loading it
Make a startup file with the code
os.loadAPI("<API NAME HERE>")

Using it
Create another file with a different name and type in the code for that API into it and run it.

A small tip
If a program that you have made requires an API please tell the people here about it. We don't want the best program ever to error because we missed out a tiny little API?
And make sure to credit the creator of the API (Not doing it could result in legal issues)

PS: Another way to test an API is to use the LUA console

Edited by FoxData, 23 July 2016 - 04:54 PM.

#2 Exerro

  • Members
  • 801 posts

Posted 21 July 2016 - 09:28 AM

You didn't mention that functions and variables have to be global when defined in the API. If you localise them, they won't be visible in the API table.

#3 Luca_S

  • Members
  • 404 posts
  • LocationGermany

Posted 21 July 2016 - 10:41 AM

Also you should remove the quotation marks around os.loadAPI() and instead use a code block also you should fix your number of quotation marks.

#4 Saldor010

  • Members
  • 467 posts
  • LocationThe United States

Posted 22 July 2016 - 03:13 AM

This is a very low content, low quality tutorial (no offense meant). You should try to expand the topic, perhaps to encompass everything about API's, instead of just one little niche. Or at the least you could add more detail to the content you already have.

#5 FoxData

  • Members
  • 158 posts

Posted 23 July 2016 - 04:54 PM

View PostLuca_S, on 23 July 2016 - 12:17 PM, said:

You still didn't fix the quotes. Jiloacom is right this tutorial is completely useless it can be looked up on the wiki.

#6 Marcell D'avis

  • Members
  • 18 posts

Posted 25 July 2016 - 01:43 PM

This tutorial really helped me, thanks! But how do I create my own API?

#7 KingofGamesYami

  • Members
  • 3,002 posts
  • LocationUnited States of America

Posted 25 July 2016 - 05:24 PM

View PostMarcell D'avis, on 25 July 2016 - 01:43 PM, said:

This tutorial really helped me, thanks! But how do I create my own API?

There's a tutorial on the wiki covering that topic.

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users