OK, i fixed it. I changed mode Objfpc to mode Freepascal and now outputs the correct parameters. Now is this a bug or a feature? because, in project options I stated Without ansistrigs, however, in mode objfpc when i search ParamStr declaration I find
{$ifdef FPC_HAS_FEATURE_COMMANDARGS}
{ ParamStr should return also an ansistring }
Function ParamStr(Param : Integer) : Ansistring;
{$endif FPC_HAS_FEATURE_COMMANDARGS}
So error probably comes from this part. I was trying to assign an ansistring to a pascal string an then triying to pass it to a pascal string argument.
Also randomly appears the following error
system.pp(57,47) Error: se esperaba ;, pero se encontro :
in that line system.pp says
mem : array[0..$7fff-1] of byte absolute $0:$0;