CryptTool mQL4 converted MQL5

 

i have translate this good tool for coding string script for obsfucation.

 but i don t why i have this error in the log of editor at the compilation "implicit conversion from 'number' to 'string' CrypTool_Mt5.mq5" ?

 and the script converse good running !

#property  script_show_inputs
input string prefix = "char";
input string text   = "input your text and go to Log.";
string rez        = ""; // here we will assemble the result

void OnStart()
  {
  // enter the original text to see what this string is
  rez = "/* " + text + " */ \n"; 
    for (int i = 0; i < StringLen(text); i++) 
  rez = rez + prefix + "[" + (StringGetCharacter(text, i)) + "]+";
  // cut the last '+' character and print string to the log
  Print(StringSubstr(rez, 0, StringLen(rez)-1));

  }
 
Leny:

i have translate this good tool for coding string script for obsfucation.

 but i don t why i have this error in the log of editor at the compilation "implicit conversion from 'number' to 'string' CrypTool_Mt5.mq5" ?

 and the script converse good running !


Please use the   SRC  button to post code . . . 

 

Use SRC 

 
Leny:

i have translate this good tool for coding string script for obsfucation.

 but i don t why i have this error in the log of editor at the compilation "implicit conversion from 'number' to 'string' CrypTool_Mt5.mq5" ?

I think it is because  StringGetCharacter  returns a unsigned short  (number)  and it is converted to text to form part of  rez
 
Leny:
sorry , thanks for modification.

No worries,  if you do an explicit cast it gets rid of the warning . . .

  rez = rez + prefix + "[" + (string)StringGetCharacter(text, i) + "]+";
 
RaptorUK:

No worries,  if you do an explicit cast it gets rid of the warning . . .

Thanks.