Trouble creating an API

Post here for help and support regarding LunaLua and SMBX2's libraries and features.
Bulby_VR
Rex
Rex
Posts: 33
Joined: Wed Aug 07, 2019 11:18 am

Trouble creating an API

Postby Bulby_VR » Sat Aug 10, 2019 11:43 am

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.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9726
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Trouble creating an API

Postby Emral » Sat Aug 10, 2019 11:54 am

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.

Bulby_VR
Rex
Rex
Posts: 33
Joined: Wed Aug 07, 2019 11:18 am

Re: Trouble creating an API

Postby Bulby_VR » Sat Aug 10, 2019 12:36 pm

This worked! Thank you for helping, now I can actually work on the library :P


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari