here is the problem when isolated from my program
this is in dbp
Script("scripts/editor.script")
GetError()
`this function will be used to execute scripts
function Script(file$)
lua load file file$
endfunction
`get script error
function GetError()
lua push function "GetError"
lua push string message$
message=lua call function(1,1)
message$=lua pop string$()
WriteError(message$,0)
AddConsoleError(message$)
endfunction
last two commands just write output to the file
and this is the lua script
function GetError(string,msg)
return msg
end
GetError("Simulated error")
Now the problem is that i get empty string insted of "Simulated error" one, can someone tell me how to return the string from this command? Btw i am using barnskis's lua plugin.