hmm, so thats a dark basic pro plugin that you are attempting to use in cpp ? ...
Im not exactly sure of the implementation differences but I can tell you that DBPro strings are not compatible in a 1:1 way with any for of string or character in C++ ..
The closes would be std:string I think.etc...
The other variables would work pretty well because most of the dbpro built in data types have a 1:1 equivelant in c++ that is capable of holding the value, so calling for a dbpro integer is the same as a c++ integer(mostly).
Here is the typedef for LPSTR :
typedef __nullterminated CHAR *NPSTR, *LPSTR, *PSTR;
Its basically a character array pointer. That means that it wont work at all like DBPro style strings.
In this line here :
test=lua::get_string("Path_To_Layer1",layer1,256);
You have a variable "test" having it's value assigned by "lua::get_string" .... what type is "test", how did you declare it ? Is it "char* test;" or "std::string test;" .....
Also, intellisense should tell you what the return type is for lua::get_string..
If this plugin is designed for DBPro, I think that you will be shooting yourself in the foot trying to use it in C++. There are a number of lua scripting class libraries that you can download online for C++.
If it is designed for GDK aswell, then I would have to guess that you are mis-using some data type somewhere...(it will run fine in debug because the debugger has a heap of extra imformation about how the program is "supposed" to run, that release mode doesnt have, the debugger also looks after memory while your program executes inside of it.)
If it ain't broke.... DONT FIX IT !!!