Author Topic: Message lines are being cut short  (Read 2720 times)


(bottom print, 2 chat messages reading the same thing)

Is there a way around that, or is this some torque limitation?

I know there's a limit how long arguments can be
or maybe it was a total length limit between all arguments
Something like that



Either way, idk what you're trying to do, but it looks like gibberish and un-userfriendly as forget and should probably find some other way to represent all those values

Either way, idk what you're trying to do, but it looks like gibberish and un-userfriendly as forget and should probably find some other way to represent all those values
It's an ore inventory list.

Only other way I can think of to list inventory is to provide a GUI, and I'd rather not deal with those who can't figure out how to place a .zip file into their Add-Ons folder, so...
I could also use a command instead just to list inventory, but that's even less intuitive.

Make it cycle through ores, instead of trying to display them all at once?

yeah if you're using <color:> tags you're going to have a bad time with this. you should probs think of a better way to do what you're doing

yeah if you're using <color:> tags you're going to have a bad time with this. you should probs think of a better way to do what you're doing
I'll just get over myself and make a GUI then, would probably be better off in the long run

You can use \c0 through \c8 to change color in a single character. The reason there's a limit is because there's a character limit for commandToClient and commandToServer (due to networking). A way to work around this is to use a client sided mod and send multiple commands, or just use multiple arguments for the function, eg:
Code: [Select]
//Client side:
function clientCmdLongBottomPrint(%msg1, %msg2, %msg3, %msg4, %msg5, %msg6, %msg7, %msg8)
{
    for(%i=1; %i <= 8; %i++)
        %message = %message @ %msg[%i];

    clientCmdBottomPrint(%message);
}

//Server side:
function GameConnection::longBottomPrint(%client, %message)
{
    %len = strLen(%message);
    for(%i=1; %i <= %len / 128; %i++) //Replace 128 with the char limit, i forgot the precise amount
    {
        %msg[%i] = getSubStr(%message, %i * 128, 128);
    }

    commandToClient(%client, 'LongBottomPrint', %msg1, %msg2, %msg3, %msg4, %msg5, %msg6, %msg7, %msg8);
}
(You'll want to also pass the time and the bool for the black box thing, but i forgot what order they're in)