Page 1 of 1
LunaLua not working
Posted: Thu Aug 11, 2016 4:11 pm
by Shadowblitz16
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
Re: LunaLua not working
Posted: Thu Aug 11, 2016 4:14 pm
by PixelPest
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
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:04 pm
by Shadowblitz16
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?
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:11 pm
by Yoshi021
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.
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:14 pm
by Shadowblitz16
do I need to include it in lunadll.lua?
if so what do I write?
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:31 pm
by Yoshi021
If you write code on the "lunaworld.lua" it will affect the entire episode automatically.
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:40 pm
by Shadowblitz16
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
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:53 pm
by underFlo
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.
Re: LunaLua not working
Posted: Thu Aug 11, 2016 5:57 pm
by Shadowblitz16
ok now it says
on line 1 attempt to index global 'API' (a nil value)
Re: LunaLua not working
Posted: Thu Aug 11, 2016 6:13 pm
by underFlo
Your LunaLua is outdated.
Re: LunaLua not working
Posted: Thu Aug 11, 2016 7:55 pm
by Shadowblitz16
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
Re: LunaLua not working
Posted: Fri Aug 12, 2016 9:35 pm
by Shadowblitz16
does anybody know why SMB3_Overhaul is not drawing and updating the graphics properly?
http://imgur.com/a/w9DBT
Re: LunaLua not working
Posted: Sat Aug 13, 2016 3:27 am
by underFlo
Pretty sure that's because the API is pretty outdated.
Re: LunaLua not working
Posted: Tue Aug 16, 2016 12:59 am
by Shadowblitz16
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/
Re: LunaLua not working
Posted: Tue Aug 16, 2016 7:02 am
by Emral
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.
Re: LunaLua not working
Posted: Sun Aug 21, 2016 10:42 pm
by Shadowblitz16
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
Re: LunaLua not working
Posted: Sun Aug 21, 2016 10:45 pm
by PixelPest
You don't. Or you could rewrite/update it yourself, but that would probably be quite a bit of work