{"action":"opened","issue":{"url":"https://api.github.com/repos/luaj/luaj/issues/23","repository_url":"https://api.github.com/repos/luaj/luaj","labels_url":"https://api.github.com/repos/luaj/luaj/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/luaj/luaj/issues/23/comments","events_url":"https://api.github.com/repos/luaj/luaj/issues/23/events","html_url":"https://github.com/luaj/luaj/issues/23","id":381834338,"node_id":"MDU6SXNzdWUzODE4MzQzMzg=","number":23,"title":"Lua file operation. The object passed by Java calls the object containing the string parameter.","user":{"login":"qssq","id":14260426,"node_id":"MDQ6VXNlcjE0MjYwNDI2","avatar_url":"https://avatars2.githubusercontent.com/u/14260426?v=4","gravatar_id":"","url":"https://api.github.com/users/qssq","html_url":"https://github.com/qssq","followers_url":"https://api.github.com/users/qssq/followers","following_url":"https://api.github.com/users/qssq/following{/other_user}","gists_url":"https://api.github.com/users/qssq/gists{/gist_id}","starred_url":"https://api.github.com/users/qssq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qssq/subscriptions","organizations_url":"https://api.github.com/users/qssq/orgs","repos_url":"https://api.github.com/users/qssq/repos","events_url":"https://api.github.com/users/qssq/events{/privacy}","received_events_url":"https://api.github.com/users/qssq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-17T06:34:29Z","updated_at":"2018-11-17T06:34:29Z","closed_at":null,"author_association":"NONE","body":"**:org.luaj.vm2.LuaError: chunkname:40 bad argument: userdata expected, got string**\r\n\r\n\r\n我应该怎么把 lua 字符串传递给msgitem对象。  我能使用item.getMessage()够获取java对象字符串，但是我无法设置lua字符串给java对象。  如果实现自动databind呢？\r\nHow should I pass the Lua string to the msgitem object? I can use item. getMessage () to get the Java object string, but I can't set the Lua string to the Java object. What if automatic databind is implemented?\r\n\r\nerrordetails\r\n```\r\n:org.luaj.vm2.LuaError: chunkname:40 bad argument: userdata expected, got string\r\n\tat org.luaj.vm2.LuaValue.argerror(Unknown Source)\r\n\tat org.luaj.vm2.LuaValue.checkuserdata(Unknown Source)\r\n\tat org.luaj.vm2.lib.jse.JavaMethod$Overload.call(Unknown Source)\r\n\tat org.luaj.vm2.LuaClosure.execute(Unknown Source)\r\n\tat org.luaj.vm2.LuaClosure.onInvoke(Unknown Source)\r\n\tat org.luaj.vm2.LuaClosure.invoke(Unknown Source)\r\n```\r\n\r\nLua code\r\n```\r\nfunction onReceiveMsgIsNeedIntercept(msgitem, aiteList, hasAite, hasAiteMe)\r\n\r\n        msgitem.setMessage(\"test !\")    --     40  is error line \r\n\r\n\r\n```\r\n\r\n\r\nJava Code \r\n\r\n```\r\n\r\n                    Varargs invoke = funcValue.invoke(new LuaValue[]{LuaUtil.createLuaValueByObj(item) });\r\n\r\n                    return invoke.arg1().checkboolean();//\r\n```\r\n\r\nitem Obj Class\r\n\r\n\r\n```\r\n\r\npublic class MsgItem {\r\n\r\n\r\n    public String getNickname() {\r\n        return nickname;\r\n    }\r\n\r\n  public MsgItem setMessage(String message) {\r\n        this.message = message;\r\n        return this;\r\n    }\r\n\r\n\r\n```\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"qssq"}}