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.
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.
Comment