From c6d245b8439786084b2758acb75a7e0fd93f7ec4 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Sun, 23 Jun 2019 08:13:17 -0400 Subject: [PATCH] fix: syntax erros in luascripts --- client/lualibs/emulator.lua | 6 +++--- client/lualibs/read15.lua | 2 +- client/scripts/amiibo.lua | 4 ++-- client/scripts/mifareplus.lua | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/client/lualibs/emulator.lua b/client/lualibs/emulator.lua index 843d8f9f1..af92d5cf8 100644 --- a/client/lualibs/emulator.lua +++ b/client/lualibs/emulator.lua @@ -14,7 +14,7 @@ function Emulator:set_mem (data, clear_first) -- Clear out the emulator memory first local memclrCmd = Command:newMIX{cmd = cmds.CMD_MIFARE_EML_MEMCLR} - local _, err = memclrCmd.sendMIX() + local _, err = memclrCmd:sendMIX() if err then print('Failed to clear emulator memory:', err) return false @@ -36,7 +36,7 @@ function Emulator:set_mem (data, clear_first) arg2 = self.BLOCK_COUNT} -- Send command and wait for response - local _, err = memsetCmd.sendMIX() + local _, err = memsetCmd:sendMIX() if err then print('Failed setting memory', err) return false @@ -62,7 +62,7 @@ function Emulator:get_mem (size) arg2 = MAX_BLOCKS, arg3 = 0} - local response, err = getmemCmd.sendMIX() + local response, err = getmemCmd:sendMIX() if err then print('Failed getting memory:', err) return false diff --git a/client/lualibs/read15.lua b/client/lualibs/read15.lua index 88cce5484..0b9a6476e 100644 --- a/client/lualibs/read15.lua +++ b/client/lualibs/read15.lua @@ -147,7 +147,7 @@ local function disconnect15693() local c = Command:newMIX{cmd = cmds.CMD_ISO_15693_COMMAND} -- We can ignore the response here, no ACK is returned for this command -- Check /armsrc/iso14443a.c, ReaderIso14443a() for details - return c.sendMIX(true) + return c:sendMIX(true) end local library = { diff --git a/client/scripts/amiibo.lua b/client/scripts/amiibo.lua index 3d8e026dd..73366de02 100644 --- a/client/scripts/amiibo.lua +++ b/client/scripts/amiibo.lua @@ -21,7 +21,7 @@ local function nfc_read_amiibo () arg2 = 135 } - local result, err = command.sendMIX() + local result, err = command:sendMIX() if result then -- Do Mifare Ultralight read local count, cmd, arg0, data_len, offset = bin.unpack('LLLL', result) @@ -95,7 +95,7 @@ local function emulate_amiibo (amiibo_data) arg2 = uid_first, arg3 = uid_second } - local _, err = simCmd.sendMIX() + local _, err = simCmd:sendMIX() if err then print('Failed to start simulator', err) return diff --git a/client/scripts/mifareplus.lua b/client/scripts/mifareplus.lua index 02e1e6c76..a81be26d8 100644 --- a/client/scripts/mifareplus.lua +++ b/client/scripts/mifareplus.lua @@ -80,7 +80,7 @@ local function sendRaw(rawdata, crc, power) data = rawdata } local ignore_response = false - local result, err = command.sendMIX(ignore_response) + local result, err = command:sendMIX(ignore_response) if result then --unpack the first 4 parts of the result as longs, and the last as an extremely long string to later be cut down based on arg1, the number of bytes returned local count,cmd,arg1,arg2,arg3,data = bin.unpack('LLLLH512',result)