lua - Attempt to load library; get "bad image" error -
i've been trying load library lua file. sparing details, not important, have tried many ways.
the final way, , 1 believe right although still can't work, utilize "package.loadlib". see code:
ed = package.loadlib("encode_decode.lua", "luaopen_ed") print(ed)
but when run programme error:
encode_decode.lua either not designed run on windows or contains error. seek installing programme 1 time again using original installation media or contact scheme administrator or software vendor support.
i know programme runs because used internally test it's encoding , decoding abilities , worked fine. i'd prefer not moving contents of library on main lua file crowded is. if have though.
yes in main folder. i've tried changing extension of library file .dll, same error.
what doing wrong?
i apologize in advance if duplicate, did best research problem thoroughly could. honest it's 3 , i've been searching hour.
stupid beginner mistake, used wrong syntax.
require("encode_decode") print(dec("bnvs")) --returns "nul"
lua compiler-errors
No comments:
Post a Comment