Author Topic: Torque Console Commands  (Read 74930 times)

It was a very subtle joke by port, read again
i don't get it :(

i don't get it :(
You asked what that function did, Port said "It displays a syntax error report" because your function did not have the word function before it.

You asked what that function did, Port said "It displays a syntax error report" because your function did not have the word function before it.
i get that

it still doesn't answer my question about the function of the working function :(

Code: [Select]
sC(%a,%b,%c)
{
if(%b==%c)
return %a;
%d = %b;
%e = %c;
%b = Min(%d, %e);
%c = Max(%d, %e);
%f = getSubStr(%a, %b, 1);
%g = getSubStr(%a, %c, 1);
if(%b > 0)
%i = getSubStr(%a, 0, %b);
else
%i = "";
if(%b+1 != %c)
%j = getSubStr(%a, %b+1, (%c - %b) - 1);
else
%j = "";
if(%c < strLen(%a) - 1)
%h = getSubStr(%a, %c+1, strLen(%a));
else
%h = "";
return %i @ %g @ %j @ %f @ %h;
}
This does nothing of any use, at least out of context. It appears to chop up "A" and rearrange the numbers. sC(1234, 2, 4) -> 1243.
« Last Edit: August 20, 2012, 03:11:14 AM by TripNick »

This does nothing of any use, at least out of context. It appears to chop up "A" and rearrange the numbers. sC(1234, 2, 4) -> 1243.
try sC("abcd", 0, 3);

try sC("abcd", 0, 3);
It's too long for console and I'm too lazy to paste it into a file. Is there a point you're trying to make with this?

It's too long for console and I'm too lazy to paste it into a file. Is there a point you're trying to make with this?
Yes.
Try it and see for yourself, it actually does do something.

I never said it didn't. I said it was useless out of context. There's lots of uses for functions that seem completely useless out of context.

try sC("abcd", 0, 3);
The result is the letters a b c d randomly combined.
Ok.

Um... what

The result is the letters a b c d randomly combined.
Ok.

Um... what
It's "dbca" isn't it?

Think carefully about how the letters are ordered, and what you inputted to the function.

It's "dbca" isn't it?

Think carefully about how the letters are ordered, and what you inputted to the function.
it swapped the letters at position 0 and 3
ok
and

Oh, I loving understand. Holy stuff. How did I miss that? sC -> switchCharacters. I feel like a handicap.

Oh, I loving understand. Holy stuff. How did I miss that? sC -> switchCharacters. I feel like a handicap.
._.
ok whats the use for us?


Oh, I loving understand. Holy stuff. How did I miss that? sC -> switchCharacters. I feel like a handicap.
...forget

.... i swear i could do that in less space than ip's code...