Skip to main content
GameDev.net gamedev.net
🔒 Locked

Anybody know UnrealScript?

Started by supesfan Mar 12, 2013 at 5:40 PM 0 replies 700+ views
Original Post
supesfan
supesfan

I am following a turorial on UnrealScript and I am running into some trouble. Nothing major as far as I can tell, but I'd rather fix it now just incase it turns into a bigger problem later.

This is the Code
Class AwesomeActor extends Actor
placeable;
var int NumberOfKittens;
function PostBeginPlay()
{
NumberOfKittens = 5;
`log("Number of kittens:" @ NumberOfKittens);
}
defaultproperties
{
Begin Object Class=SpriteComponent Name=Sprite
Sprite=Texture2D'EditorResources.S_NavP'
HiddenGame=True
End Object
Components.Add(Sprite)
}
It's a simple example of how integer variables work and it's supposed to log the value of NumberOfKittens inside the directory C:UDK/UDKGAME/Logs/Launch.log or Launch_2.log on a certain line after compiling the code.
This is what it is supposed to say:
ScriptLog: Number of kittens: 5
Instead it says this:
ScriptLog: Warning - PATHS NOT DEFINED or NO PLAYERSTART with positive rating
I am not sure if it is a big deal or not but I was just wondering why it is doing that. I double checked my code and it seems fine, it compiles with 0 errors
supesfan
supesfan

You know, I just solved my own problem. It turns I had to run the game in the UDK editor before the changes in the code were logged.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.