L1L1 / cardpeek

Automatically exported from code.google.com/p/cardpeek
Other
439 stars 115 forks source link

Windows 10 & 7 cant save .ddd file #88

Open kevinafton opened 7 years ago

kevinafton commented 7 years ago

Hi,

[tachograph.lua]

I fixed an error with a simple hack, somebody with more lua knowledge should fix it more precisely.

There was "Attempt to index a nil value " error in function ddd_save(card) on the line "user_name = card:find_first({label='hoderSurname'}):get_attribute("alt")".

I just changed it to user_name = "my_cronotachygraphe". Had to do the same on the next line.

==============

There is also an ERROR [string "tachograph.lua"]:291: attempt to index local 'conversion' (a nil value).

local converted = conversion:iconv(data:sub(1):format("%C"))

If somebody could look into it, it would be great.

But at least we can now save the results in a .ddd file. That is if you put ddd_save(CARD) function call before the for loop because the script crashes in there.

Thanks

Xdavius commented 2 years ago

I've patched it. look at my patch. 3 years later... maybe i'm late ^^