Announcement

Collapse
No announcement yet.

Help: Error, Unexpected 'config'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help: Error, Unexpected 'config'

    I'm new to unrealscript and am getting a Error, Unexpected 'config'.

    class AwesomeActor extends Actor//location = development/source
    placeable;//Allows placement

    // Config variables

    config(Game);//Defined in the game ini

    var config int MyConfigInt;// Makes a config variable.

    function PostBeginPlay()
    {
    `log("MyConfigInt:" @ MyConfigInt);
    }



    defaultproperties
    {

    Begin Object Class=SpriteComponent Name=Sprite
    Sprite=Texture2D'EditorResources.S_NavP'
    End Object
    Components.Add(Sprite)

    }


    //In DefaultGame.ini

    [AwesomeGame.AwesomeActor]
    MyConfigInt=3


    The script log should be 3, but I get a error during compilation.
    I attached screenshots.
    Attached Files

    #2
    Config(Game) should be part of the class declaration, not separate.

    Code:
    class AwesomeActor extends Actor placeable config(Game);

    Comment


      #3
      Thank you.

      Comment

      Working...
      X