Having trouble compiling UnrealScript with defaultproperties

Posted by Enchanter on Game Development See other posts from Game Development or by Enchanter
Published on 2014-01-21T02:28:44Z Indexed on 2014/06/09 9:45 UTC
Read the original article Hit count: 285

Filed under:
|

Have just started scripting in Unreal Script and am following the instructions of the opening chapter of a book on the subject. I have set the development tools up as described in the book such that it is now possible to compile the scripts for UDK before adding them to a level. My issue is: the very first script the book asks you to compile is the following:

class AwesomeActor extends Actor
placeable;

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

}

And when I hit F9 in the compiler I get the following error message: Error, BEGIN OBJECT: Must specify valid name for suboject/copmponent: Begin Object class=SpriteComponent name = Sprite

My question: As far as I'm aware I've copied the code from the book veribatim including capital and smaller case letters but I'm getting this error and I was wondering if anyone knew why and if so how I would fix it?

© Game Development or respective owner

Related posts about udk

Related posts about scripting