I have a script command which fetches a character's name from the .@atcmd_parameters$[] and displays them in a message.
How do I get them to display in one line?
Currently I can only get them to display if I print it one line at a time (using message())
- script Print Names FAKE_NPC,{
end;
OnCommand:
// If user inputs no parameters (i.e. character name)
if (!.@atcmd_numparameters)
{
message(strcharinfo(PC_NAME), "Usage: @printname <name of player to print>");
message(strcharinfo(PC_NAME), "@printname failed.");
end;
}
.@size = getarraysize(.@atcmd_parameters$);
for (.@i = 0; .@i < .@size; ++.@i)
{
.@player$[.@i] = .@atcmd_parameters$[.@i];
message(strcharinfo(PC_NAME), "" + .@player$[.@i] + "");
}
end;
OnInit:
bindatcmd("printname", "Print Names::OnCommand", 10 ,96 , true);
end;
}
If I typed @printname John Smith, it would appear like this:
However, I would like it to be on the same line.
Thank you for any help.