Page 1 of 1

Trouble creating an API

Posted: Sat Aug 10, 2019 11:43 am
by Bulby_VR
I'm currently trying to create an API, but nothing it does applies. It gives me this error:

Image

My code is here on paste bin:
https://pastebin.com/GdndQ1zg

My local script is this:

Code: Select all

sm3dw = API.load("sm3dwMove");
I have no idea why this error happens, and would like any help I can get.

Re: Trouble creating an API

Posted: Sat Aug 10, 2019 11:54 am
by Enjl
It's called a library, not an API. The lunalua API is the thing that does the loading.

The error here is in line 39, according to the error message. Based on your code, it's a typo. Notice how in line 37 you use player:mem with a colon, but then you switch to player.mem with a period. The former is the correct way to use it.

Re: Trouble creating an API

Posted: Sat Aug 10, 2019 12:36 pm
by Bulby_VR
This worked! Thank you for helping, now I can actually work on the library :P