I am working on a mutator for Inf 2.9 CE that will tweak the bots a bit, such as not being able to see through tree textures that we cannot see through. A few maps are currently nearly impossible to win if bots are your opponents due to so much foliage that humans cannot see bots, but bots can see humans anywhere.
Part of my code needs to do a string comparison when compiled in debug mode and I cannot figure out how to do it in UT99. I used a function that Wormbo created some time ago, but the function will not compile with Infiltration and I cannot determine why. Can somebody help me figure this out?
I am told that the function declaration is missing an ending paranthesis ")" when attempting to compile. I must be missing something. Maybe I am mixing some UT03/04 or UT3 in here and not catching it. It has been several years sicne I last used UT99 UnrealScript.
Part of my code needs to do a string comparison when compiled in debug mode and I cannot figure out how to do it in UT99. I used a function that Wormbo created some time ago, but the function will not compile with Infiltration and I cannot determine why. Can somebody help me figure this out?
Code:
static final function int StrCmp(coerce string S, coerce string T, optional int Count = MaxInt, optional bool bCaseSensitive = False)
{
S = Left(S, Count);
T = Left(T, Count);
if (bCaseSensitive ? (S == T) : (S ~= T))
return 0;
return (bCaseSensitive ? (S > T) : (Caps(S) > Caps(T))) ? 1 : -1;
}