LunaLua not working

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

LunaLua not working

Postby Shadowblitz16 » Thu Aug 11, 2016 4:11 pm

hello I recently installed the vcredist_x86.exe

however when I follow the instructions on how to use the SMB3 overhaul nothing happens

I included LuaWorld.lua both in..
"SMBX 2.0 Open Beta-Release 2\worlds\SMB3" and
"SMBX 2.0 Open Beta-Release 2\worlds\SMB3\Level1"
and inside it put...

Code: Select all

_smb3overhaul = loadAPI("smb3overhaul");

onLoad()
{
	_smb3overhaul.setSecondsLeft(100);
	_smb3overhaul.setTimerState(true);
	_smb3overhaul.usesPBar(true);
	_smb3overhaul.useEasyMode(false);
	_smb3overhaul.usesCard(true);
	_smb3overhaul.disableSpinJump(true);
}
however it doesn't work it the SMBX legacy editor when I test my level
I am using the SMBX launcher so idk

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: LunaLua not working

Postby PixelPest » Thu Aug 11, 2016 4:14 pm

onLoad() won't do anything. It's function onLoad(). There's also no reason to have table brackets. I have no idea why those are there. loadAPI() is also deprecated; use API.load() instead. It should also be local _smb3overhaul in the first line. You seem to have no idea what you're writing from what I see here

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Thu Aug 11, 2016 5:04 pm

PixelPest wrote:onLoad() won't do anything. It's function onLoad(). There's also no reason to have table brackets. I have no idea why those are there. loadAPI() is also deprecated; use API.load() instead. It should also be local _smb3overhaul in the first line. You seem to have no idea what you're writing from what I see here
do I use the "LuaWold.lua" file in my level's folder or in my episode's folder?

Yoshi021
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 691
Joined: Thu Jan 21, 2016 9:06 pm
Flair: :)
Pronouns: He/Him

Re: LunaLua not working

Postby Yoshi021 » Thu Aug 11, 2016 5:11 pm

Its "lunaworld.lua" not "LuaWold.lua". You want to use "lunaworld.lua" when you want scripts to affect every level in an episode. You place "lunaworld.lua" in the episode folder.

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Thu Aug 11, 2016 5:14 pm

do I need to include it in lunadll.lua?
if so what do I write?

Yoshi021
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 691
Joined: Thu Jan 21, 2016 9:06 pm
Flair: :)
Pronouns: He/Him

Re: LunaLua not working

Postby Yoshi021 » Thu Aug 11, 2016 5:31 pm

If you write code on the "lunaworld.lua" it will affect the entire episode automatically.

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Thu Aug 11, 2016 5:40 pm

ok so I got my file lunaworld.lua
however I get an error of "unexpected symbol near '.' "

Code: Select all

local _smb3overhaul = API.load("smb3overhaul");
local _smb3goalcard = API.load("smb3goalcard");
local _smb3inventory = API.load("sbm3inventory");

function onLoad()

	--SMB3 OverHaul--
	local _smb3overhaul.setSecondsLeft(100);
	local _smb3overhaul.setTimerState(true);
	local _smb3overhaul.usesPBar(true);
	local _smb3overhaul.useEasyMode(false);
	local _smb3overhaul.usesCard(true);
	local _smb3overhaul.disableSpinJump(true);
	
	--SMB3 GoalCard--
	smb3card.usesCard(true)
	
	--SMB3 Inventory--
end

underFlo
Wart
Wart
Posts: 4456
Joined: Mon Jul 14, 2014 10:44 am
Flair: sup im lesbiab
Pronouns: They/She
Contact:

Re: LunaLua not working

Postby underFlo » Thu Aug 11, 2016 5:53 pm

Don't put local when editing elements of an already existing table.

Also, you define API.load("smb3goalcard") as "_smb3goalcard" but then use it as "smb3card" later on.

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Thu Aug 11, 2016 5:57 pm

ok now it says
on line 1 attempt to index global 'API' (a nil value)

underFlo
Wart
Wart
Posts: 4456
Joined: Mon Jul 14, 2014 10:44 am
Flair: sup im lesbiab
Pronouns: They/She
Contact:

Re: LunaLua not working

Postby underFlo » Thu Aug 11, 2016 6:13 pm

Your LunaLua is outdated.

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Thu Aug 11, 2016 7:55 pm

Spinda wrote:Your LunaLua is outdated.
so I got it working however only fonts are showing
there seems to be the p meter working too kinda..
once the pmeter graphics are drawn they don't go away

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Fri Aug 12, 2016 9:35 pm

does anybody know why SMB3_Overhaul is not drawing and updating the graphics properly?
http://imgur.com/a/w9DBT

underFlo
Wart
Wart
Posts: 4456
Joined: Mon Jul 14, 2014 10:44 am
Flair: sup im lesbiab
Pronouns: They/She
Contact:

Re: LunaLua not working

Postby underFlo » Sat Aug 13, 2016 3:27 am

Pretty sure that's because the API is pretty outdated.

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Tue Aug 16, 2016 12:59 am

Spinda wrote:Pretty sure that's because the API is pretty outdated.
nope I updated to the most recent version of lunalua
I downloaded it from http://wohlsoft.ru/LunaLua/

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

Re: LunaLua not working

Postby Emral » Tue Aug 16, 2016 7:02 am

The API is outdated, it wasn't updated in ages. It was not made by the people who update LunaLua itself. Updating lunalua won't provide a nonexistent update to the API.

Shadowblitz16
Swooper
Swooper
Posts: 62
Joined: Tue Aug 09, 2016 1:41 pm

Re: LunaLua not working

Postby Shadowblitz16 » Sun Aug 21, 2016 10:42 pm

Enjl wrote:The API is outdated, it wasn't updated in ages. It was not made by the people who update LunaLua itself. Updating lunalua won't provide a nonexistent update to the API.
oh I thought you guys meant lunalua when you your referred to "API"

how do I update this API you guys are talking about

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: LunaLua not working

Postby PixelPest » Sun Aug 21, 2016 10:45 pm

You don't. Or you could rewrite/update it yourself, but that would probably be quite a bit of work


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari