Well, looking at the reference, you're supposed to send the script line by line, so all is fine.
You have an array of char* in the example, and you have an array of char* now. Nothing changed.
Erm yes, why did you even change that? You really should revise arrays, C strings and pointer arithmetic. I could try explaining, but I have no idea what you know and what you don't and why you think this could possibly work (or if you even care).
I do care ;)
Unfortunately I don't know much about arrays and C strings indeed.
Though I do know that this doesn't work, since the script has to be and stay a char* script1[]... but this is why I don't fully understand that you told me
Well, this is how it should look like: char** script1 = const_cast<char**>(cscript1);
I'm not really sure if we're talking about the same thing, but there are two possibilities here of how you can use const_cast. Either directly on the C strings returned by c_str() or on the entire array (or later when you call SendCommand, for that matter).