Results 1 to 3 of 3
  1. #1
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Posts
    272

    Default Check bool from seperate class in if statement

    I'm a bit confused on how to check a bool from a separate class (AccessoryCompGrip) then do something based on the result. Here is what I have in my Pawn class:

    Code:
    var AccessoryCompGrip bIsVertGrip; 
    
    function Blah()
    {
    	if (AccessoryCompGrip.bIsVertGrip == true)
    	{
                    // Do something  
    	}
    	else
    	{
                   // Do something else
    	}
    }
    My error is : Bad or missing expression for token: AccessoryCompGrip, in 'if'.

    Am I not tracking back to the class properly?

  2. #2
    Veteran
    Join Date
    Sep 2006
    Location
    Newcastle, UK
    Posts
    6,942
    Gamer IDs

    Gamertag: ambershee

    Default

    You're declaring a member of type AccessoryCompGrip called bIsVertGrip, then trying to use a boolean called bIsVertGrip in a member that does not exist called AccessoryCompGrip.
    - Please do not send me questions regarding programming or implementing things in UDK via Private Message. I do not have time to respond and they are much better answered in the forums. -

  3. #3
    MSgt. Shooter Person
    Join Date
    Jan 2010
    Posts
    272

    Default

    Thanks ambershee... I am an artist learning programming and I think I need to go back and spend some time with key concepts.

    I did get it working, albeit a slightly different way than I originally set out with. But you pointed at what to look at.

    Cheers!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.