Hi, kinda new to all this - stole the code from somewhere (post #12) (Heeheehee - well their download links were all dead anyways, fortunately the author left with the code so I *should* be able to compile it myself). It just tells me this error:
And then doesn't compile. What's wrong with "ServerColorActor"? I don't understand.......don't even know how to code lol, as long as there's instructions on how to compile provided source code is available, then I just re-compile it(if the download links are all dead as is the norm around here), but coding itself is a no no for me..heh.

Here's the code:
Can someone hear who knows coding tell what's wrong please?

And then doesn't compile. What's wrong with "ServerColorActor"? I don't understand.......don't even know how to code lol, as long as there's instructions on how to compile provided source code is available, then I just re-compile it(if the download links are all dead as is the norm around here), but coding itself is a no no for me..heh.
Here's the code:
Code:
class ServerColorMut extends Mutator config (ServerColorMut);
var config string ServerName;
var config string MapColor;
var config string WaveColor;
var config string WavePrefix;
var config string TimeColor;
var config string TimePrefix;
var config string MonsterColor;
var config string MonsterPrefix;
var config string NotStartedColor;
var config string NotStartedPrefix;
var ServerColorActor SCA;
function PostBeginPlay ()
{
SCA = Spawn (class'ServerColorActor ');
}
class ServerColorActor extends Info;
var GameRules GRules;
function PostBeginPlay ()
{
GRules = Spawn (class'ServerColorInfo ');
if (Level.Game.GameRulesModifiers == none)
Level.Game.GameRulesModifiers = GRules;
else
Level.Game.GameRulesModifiers.AddGameRules (GRules);
super (Actor) .PostBeginPlay ();
}
class ServerColorInfo extends GameRules;
function GetServerDetails (out GameInfo.ServerResponseLine ServerState)
{
local string sTemp;
local int waveNum;
local int monsterNum;
local int elapsedTime;
local KFGameReplicationInfo KFGRI;
KFGRI = KFGameReplicationInfo (Level.GRI);
waveNum = KFGRI.WaveNumber + 1;
elapsedTime = KFGRI.ElapsedTime;
monsterNum = KFGRI.MaxMonsters;
// Set the server name. If the variable in the ini is not zero, then paint in the color of what is written in the ini
if (class'ServerColorMut'.default.ServerName! = "")
ServerState.ServerName = class'ServerColorMut'.default.ServerName;
else // Otherwise, draw a white value of the variable specified in the ServerName KillingFloor.ini
ServerState.ServerName = Level.Game.GameReplicationInfo.ServerName;
// If you specify a color for the card - draw the name of the color card
if (class'ServerColorMut'.default.MapColor! = "")
{
sTemp = ServerState.MapName;
if (Left (sTemp, 1)! = "")
{
sTemp = class'ServerColorMut'.default.MapColor $ sTemp;
ServerState.MapName = sTemp;
}
}
// If you specify a color for the wave - draw the wave number, if not specified - do not write anything
if (class'ServerColorMut'.default.WaveColor! = "")
{
// Color + prefix + value
sTemp = class'ServerColorMut'.default.WaveColor $ class'ServerColorMut'.default.WavePrefix $ waveNum;
if (Level.Game.GetStateName () == 'MatchInProgress')
ServerState.ServerName @ = sTemp;
}
// If you specify a color for the time - draw the time elapsed since the start of the card, if not specified - do not write anything
if (class'ServerColorMut'.default.TimeColor! = "")
{
// Color + prefix + value
sTemp = "" $ class'ServerColorMut'.default.TimeColor $ class'ServerColorMut'.default.TimePrefix $ GetTimeString (elapsedTime);
if (Level.Game.GetStateName () == 'MatchInProgress')
ServerState.ServerName @ = sTemp;
}
// If you specify a color for the amount of the remaining monsters - draw the otherwise - do not write anything
if (class'ServerColorMut'.default.MonsterColor! = "")
{
// Color + prefix + value
sTemp = "" $ class'ServerColorMut'.default.MonsterColor $ class'ServerColorMut'.default.MonsterPrefix $ monsterNum;
if (Level.Game.GetStateName () == 'MatchInProgress')
ServerState.ServerName @ = sTemp;
}
// Set the label and its color to a situation where the game is not opened yet
if (class'ServerColorMut'.default.NotStartedColor! = "")
{
sTemp = "" $ class'ServerColorMut'.default.NotStartedColor $ class'ServerColorMut'.default.NotStartedPrefix;
if (Level.Game.GetStateName ()! = 'MatchInProgress')
ServerState.ServerName @ = sTemp;
}
}
function string GetTimeString (int seconds)
{
local int cMinutes, cSeconds;
local string result;
cMinutes = seconds / 60;
cSeconds = seconds% 60;
if (cMinutes <10)
result $ = "0";
result $ = string (cMinutes);
result $ = ":";
if (cSeconds <10)
result $ = "0";
result $ = string (cSeconds);
return result;
}
Can someone hear who knows coding tell what's wrong please?
Last edited: