ChatTranslator - Failed to compile: ChatTranslator.cs(201,25): error CS0841: A local variable `appChatMessage' cannot be used before it is declared
ChatTranslator - Error - August wipe
Hello MrBlue,
IΒ΄ve got the same Problem.Β
ChatTranslator - Failed to compile: ChatTranslator.cs(201,25): error CS0841: A local variable `appChatMessage' cannot be used before it is declared
Hope you can find an solution. Btw, a very good Plugin, it really helps a lot! :-)
Cheers maetinio
comment this out and it should load. App translation will be broken though.
Β
switch (channel)
{
case 1: // Team chat
BasePlayer basePlayer = sender.Object as BasePlayer;
RelationshipManager.PlayerTeam team = basePlayer.Team;
//if (team != null && team.members.Count != 0)
// {
// Rust companion app support
// uint current = (uint)Facepunch.Math.Epoch.Current;
// ulong targetId = ulong.Parse(target.Id);
// CompanionServer.Server.TeamChat.Record(team.teamID, targetId, target.Name, translation, prefixColor, current);
// ProtoBuf.AppBroadcast appBroadcast = Facepunch.Pool.Get<ProtoBuf.AppBroadcast>();
// appBroadcast.teamMessage = Facepunch.Pool.Get<ProtoBuf.AppTeamMessage>();
// appBroadcast.teamMessage.message = Facepunch.Pool.Get<ProtoBuf.AppChatMessage>();
// appBroadcast.ShouldPool = false;
// ProtoBuf.AppChatMessage appChatMessage = appBroadcast.teamMessage.message;
// appChatMessage.steamId = targetId;
// appChatMessage.name = target.Name;
// appChatMessage.message = translation;
// appChatMessage.color = prefixColor;
// appChatMessage.time = current;
// CompanionServer.Server.Broadcast(new CompanionServer.PlayerTarget(targetId), appBroadcast);
// appBroadcast.ShouldPool = true;
// appBroadcast.Dispose();
// }
break;
}
πthx, it works