UE2 - UT2kX Raven Shield Compiling Error

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Riskbreaker

New Member
May 18, 2011
5
0
0
Valendia
Hello all,

I am currently working on bringing the skin selection functionality over to the Mac version of Raven Shield. One of the scripts is having a compiling error in an "if" statement and I cannot figure out what is wrong with it. Usually that means a typo or something along those lines but I cannot figure out what the typo is or what I left out of the code.
If anyone could provide assistance I would appreciate it very much. If more information is needed or anything, please let me know. I also made a comment on the problematic line so it would be easier to find. The code for this file is as follows...

Code:
//================================================================================
// R6MenuMPArmor.
//================================================================================

class R6MenuMPArmor extends UWindowDialogControl;

var R6WindowButtonGear m_2DArmor;
var R6WindowButtonGear m_2DArmorRed;

function Created ()
{
  m_2DArmor = R6WindowButtonGear(CreateWindow(Class'R6WindowButtonGear',0.0,0.0,UnknownFunction175(UnknownFunction171(WinWidth,0.5),vector(1)),WinHeight,self));
  m_2DArmor.bUseRegion = True;
  m_2DArmor.m_bDrawSimpleBorder = True;
  m_2DArmor.m_iDrawStyle = 5;
  SetArmorBorderColor(m_2DArmor,9);
  m_2DArmorRed = R6WindowButtonGear(CreateWindow(Class'R6WindowButtonGear',UnknownFunction171(WinWidth,0.5),0.0,UnknownFunction171(WinWidth,0.5),WinHeight,self));
  m_2DArmorRed.bUseRegion = True;
  m_2DArmorRed.m_bDrawSimpleBorder = True;
  m_2DArmorRed.m_iDrawStyle = 5;
  SetArmorBorderColor(m_2DArmorRed,9);
}

function Register (UWindowDialogClientWindow W)
{
  Super.Register(W);
  m_2DArmor.Register(W);
  m_2DArmorRed.Register(W);
}

function SetArmorTexture (Texture t, Region R, bool _bRedTeam);

function SetButtonsStatus (bool _bDisable, bool _bRedTeam)
{
  local Region R;

  if ( _bRedTeam )
  {
    m_2DArmorRed.bDisabled = _bDisable;
  } else {
    m_2DArmor.bDisabled = _bDisable;
  }
}

function SetHighLightGreenArmor (bool _bHighLight)
{
  m_2DArmor.m_HighLight = _bHighLight;
}

function SetHighLightRedArmor (bool _bHighLight)
{
  m_2DArmorRed.m_HighLight = _bHighLight;
}

function bool IsGreenArmorSelect ()
{
  return m_2DArmor.m_HighLight;
}

function bool IsRedArmorSelect ()
{
  return m_2DArmorRed.m_HighLight;
}

function SetArmorBorderColor (UWindowDialogControl _ArmorButton, byte E)
{
  if ( UnknownFunction114(m_2DArmor,_ArmorButton) ) //Error is here in this area
  {
    if ( UnknownFunction129(m_2DArmor.bDisabled) )
    {
      if ( UnknownFunction154(vector(E),12) )
      {
        m_2DArmor.m_BorderColor = Root.Colors.TeamColorLight[1];
      } else {
        m_2DArmor.m_BorderColor = Root.Colors.TeamColorDark[1];
      }
    }
  }
  if ( UnknownFunction114(m_2DArmorRed,_ArmorButton) )
  {
    if ( UnknownFunction129(m_2DArmorRed.bDisabled) )
    {
      if ( UnknownFunction154(vector(E),12) )
      {
        m_2DArmorRed.m_BorderColor = Root.Colors.TeamColorLight[0];
      } else {
        m_2DArmorRed.m_BorderColor = Root.Colors.TeamColorDark[0];
      }
    }
  }
}

function ForceMouseOver (bool _bForceMouseOver)
{
  m_2DArmor.ForceMouseOver(_bForceMouseOver);
}

The error from the compiler is...

Code:
C:\Documents and Settings\Windows User\Desktop\SDK2\Code Environment\EditArmor\Classes\R6MenuMPArmor.uc(67) :
Error, Bad or missing expression in 'If'
Failed due to errors.

History: CompileError <- TryCompile <- FScriptCompiler::CompileScript <- (Class EditArmor.R6MenuMPArmor, Pass
1, Line 67) <- CompileScripts <- CompileScripts <- CompileScripts <- CompileScripts <- CompileScripts <- DoScr
ipts <- UEditorEngine::MakeScripts <- UMakeCommandlet::Main

Exiting due to error
The system cannot find the file specified.
 
Last edited:

.:..:

New Member
Apr 11, 2006
61
0
0
Finland
That is some Unreal Engine 1 (Unreal 1, Unreal Tournament) UWindow GUI system codes. If you want some for Unreal Engine 2 (Unreal Tournament 2003/2004) you need to do some major rewriting.
 

Riskbreaker

New Member
May 18, 2011
5
0
0
Valendia
That is some Unreal Engine 1 (Unreal 1, Unreal Tournament) UWindow GUI system codes. If you want some for Unreal Engine 2 (Unreal Tournament 2003/2004) you need to do some major rewriting.

Thank you for the reply. I am new to UnrealScript and I just realized a simple stupid mistake I had made. The decompiler I used did not properly export the functions. Are there any functional decompilers out there that can export scripts for Unreal Engine 2 code?
 

Riskbreaker

New Member
May 18, 2011
5
0
0
Valendia
Decompilers are all functional, it's just that you can't recompile decompiled scripts for various reasons.

Hmm, am I sensing sarcasm there? I will restate my question then... Are there any decompilers that create .uc files with code that can be compiled?