Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Anybody know UnrealScript?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 supesfan   Members   -  Reputation: 134

Like
0Likes
Like

Posted 12 March 2013 - 11:40 AM

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


Sponsor:

#2 supesfan   Members   -  Reputation: 134

Like
0Likes
Like

Posted 12 March 2013 - 11:50 AM

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. 






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS