Jump to content




custom API loading problems


  • You cannot reply to this topic
2 replies to this topic

#1 dcleondc

  • New Members
  • 70 posts

Posted 01 September 2012 - 09:13 PM

i'm starting to make a OS and i cant get my program to load the the API, here is my code
os.loadAPI("Dc/api/api")
Dc/api/api.MenuTurtle()
MenuTurtle() is a function i made in Dc/api/api

#2 MysticT

    Lua Wizard

  • Members
  • 1,597 posts

Posted 01 September 2012 - 09:21 PM

The name of the api is the name of the file, not the whole path. In your case it would be api, so you have to use it like:
api.MenuTurlte()
You might want to change it's name.

#3 Matrixmage

  • Members
  • 116 posts
  • LocationAt my Computer coding for the Computer in my Computer

Posted 01 September 2012 - 09:22 PM

I really don't know anything about loading api's, But I think there is something you need to call on your line 2 to use the function. But I really don't know, its just a feeling I have.

EDIT: ninja'd





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users