MAMEWorld >> Programming
Previous thread Previous  View all threads Index   Next thread Next   Flat Mode Flat  

Yugffuts
MAME Fan
Reged: 05/09/07
Posts: 94
Loc: NJ
Send PM
Re: LUA Script Help (trying to insert a coin)
11/18/22 01:53 AM


All right, I found "function lib:load_settings()" in autofire_save.lua which appears to be what I was looking for (identifying the machine buttons), so thanks for that!

Unfortunately, I'm seeing errors when attempting to require JSON from the console.


Code:


D:\MAME>mame64_247 mk -window -console -sound none

mame 0.247
Copyright (C) Nicola Salmoria and the MAME team

Lua 5.3
Copyright (C) Lua.org, PUC-Rio

[MAME]> local json = require('json')
[MAME]> print(json.stringify("{'test': 555}"))
error: [string "..."]:2: attempt to index a nil value (global 'json')
[MAME]>



Am I doing something wrong? Does "require" not work from the command line?







Entire thread
Subject Posted by Posted on
* LUA Script Help (trying to insert a coin) Yugffuts 09/24/22 09:04 PM
. * Re: LUA Script Help (trying to insert a coin) Vas Crabb  09/25/22 12:17 AM
. * Re: LUA Script Help (trying to insert a coin) Yugffuts  11/18/22 01:53 AM
. * Re: LUA Script Help (trying to insert a coin) Vas Crabb  11/18/22 07:23 AM
. * Re: LUA Script Help (trying to insert a coin) Yugffuts  11/18/22 04:19 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 11 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 703