Hmm. Your way is much better....<br><br>This morning I facepalmed over my bran flakes-I realized I could just declare the user data needed by the plugins dynamic-<br><br>(defcallback sayHello :int ((state :pointer))<br> (declare (special *message*))<br>
(let ((args (lua_gettop state)))<br> (print (format nil "Hello from Lua. Argcount:~A Message:~A" args *message*))<br> 0))<br><br>This form registers and calls the callback<br>(let ((*message* "I'm dynamic"))<br>
(declare (special *message*))<br> (lua_register *lua-state* "hello" (callback sayhello))<br> (lua_loadbuffer *lua-state* "hello(1)" (length "hello(1)" ) "line" )<br><br> (lua_pcall *lua-state* 0 0 0 ))<br>
<br>Prints out:"Hello from Lua. Argcount:1 Message:I'm dynamic"<br><br>But your way is more general....thanks a bunch<br>Mike<br>