Hi people!
I'm doing a plugin command that puts a text in a help window.
However, I can't make this plugin command put a text with more than one line. When I insert \n or \\n, the line won't break, instead, the text continues.
I can use a script call to put this text too, and it works fine with line breaks.
I only put the 4 plugin commands together to take the print, but I'm not using the four at the same time. But that's is my tries.
changehelp = command
menu = args[0]
0 = args[1]
the rest of the text is the args[2] and so on(using slice and join, to put them together. Maybe it is the cause?).
So, how can I make the plugin command to recognize the \n for line break?
Below is a part of my code. t
I'm doing a plugin command that puts a text in a help window.
However, I can't make this plugin command put a text with more than one line. When I insert \n or \\n, the line won't break, instead, the text continues.
I can use a script call to put this text too, and it works fine with line breaks.
I only put the 4 plugin commands together to take the print, but I'm not using the four at the same time. But that's is my tries.
changehelp = command
menu = args[0]
0 = args[1]
the rest of the text is the args[2] and so on(using slice and join, to put them together. Maybe it is the cause?).
So, how can I make the plugin command to recognize the \n for line break?
Below is a part of my code. t
Code:
if(command.toLowerCase() === 'changehelp') {
let arg0 = args[0].toLowerCase();
let helpType;
let helpText = '';
switch (arg0){
case "menu":
helpType = Eli.Param.HelpWindows.menuText;
break;
case "itemcategory":
helpType = Eli.Param.HelpWindows.itemCtText;
break;
case "skillcommand":
helpType = Eli.Param.HelpWindows.skillTypeText;
break;
case "equipcommand":
helpType = Eli.Param.HelpWindows.equipCmdText;
break;
case "equipslot":
helpType = Eli.Param.HelpWindows.equipSlotText;
break;
case "options":
helpType = Eli.Param.HelpWindows.optionsText;
break;
case "gameend":
helpType = Eli.Param.HelpWindows.gameEndText;
break;
};
helpText = args;
helpType[args[1]] = helpText.slice(2).join(" ");
};


