Results 1 to 4 of 4
  1. #1
    Skaarj
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    2

    Question Working in the command prompt

    Hello everyone - I just discovered these threads and had to say hi. That and to ask about something that I am sure has become native to all of you but which is giving me a bit of trouble sorting out. I would like to play with the ucc compiler in order to just make some simple Commandlet programs - just little 'hello world' stuff to let me play to my hearts content with the editor's subtleties. I have grabbed an existing Hello World program off the net that extends Commandlet:

    //================================================== ===========================
    /// UnrealScript "hello world" sample Commandlet.
    ///
    /// Usage:
    /// ucc.exe HelloWorld
    //================================================== ===========================
    class HelloWorldCommandlet
    extends Commandlet;

    var int intparm;
    var string strparm;

    function int Main( string Parms )
    {
    log( "Hello, world!" );
    if( Parms!="" )
    log( "Command line parameters=" $ Parms );
    if( intparm!=0 )
    log( "You specified intparm=" $ intparm );
    if( strparm!="" )
    log( "You specified strparm=" $ strparm );
    }

    defaultproperties
    {
    HelpCmd="HelloWorld"
    HelpOneLiner="Sample"
    HelpUsage="HelloWorld"
    HelpParm(0)="IntParm"
    HelpParm(1)="StrParm"
    HelpDesc(0)="An integer parameter"
    HelpDesc(1)="A string parameter"
    }
    "

    I have saved tried saving this file as "HelloWorld" as well as "HelloWorldCommandlet", with extensions ".uc", ".HelloWorldCommandlet", ".Commandlet", and no extensions what so ever. I have tried all of these file varieties directly in the System folder, in "UT2004\MyPackage\", and in "UT2004\MyPackage\Classes". I have tried executing "ucc HelloWorld", "ucc MyPackage.HelloWorld", "ucc MyPackage.HelloWorldCommandlet", any virtually every other combination I can think of that I will not list here. (I have always done my executions from inside the System folder since it would not allow me to use the command from anywhere else) About the only consistent thing I have is the error message:


    ====================================
    ucc.exe: UnrealOS execution environment
    Copyright 2001 Epic Games Inc
    ====================================

    Commandlet [Whatever I typed in] not found


    Incidentally, I am running UT2004. I know that it is something little, and something silly that I am missing, but it is so little and silly that I have been scouring the internet with no success in finding out what it is. Please help me, as I would love to get deeper into this engine (I am already quite comfortable with C++, MEL, etc.) Thank you!

  2. #2
    Boomshot
    Join Date
    Apr 2001
    Posts
    2,184

    Default

    You need to use ucc to compile them first, like any other Uscript
    "Mother, mother may I cry. Father will you
    teach me how to die the right way someday. I don't want a
    second chance to turn my stuttering reluctance into romance..."

  3. #3
    MSgt. Shooter Person
    Join Date
    Oct 2004
    Posts
    474
    Gamer IDs

    Gamertag: Lexikos
    Quote Originally Posted by User CP
    Please contact the Administrator if your date of birth has changed.

  4. #4
    Skaarj
    Join Date
    Nov 2006
    Location
    Atlanta, GA
    Posts
    2

    Default

    Hi, thank you both for the feedback. I tried adding the script into its own package folder ("MyScripts/Classes") and ran 'ucc make' on everything without getting any errors, but I am afraid the Commandlet extension still doesn't work -

    (retyped result of running 'ucc make' to compile everything)
    ------------MyScripts - Release ----------------------
    Analyzing...
    Parsing TestCommandlet
    Compiling TestCommandlet
    Importing Defaults for TestCommandlet
    Success - 0 error(s), 0 warning(s)


    (retyped results of 'ucc TestCommandLet' in the System folder)
    ========================================
    ucc.exe: UnrealOS execution environment
    Copyright 2001 Epic Games Inc
    ========================================
    Commandlet TestCommandlet not found


    Am I missing something completely obvious?

    -----------------------------------------------------------------------------
    [EDIT]: Got it! Thank you so much - I went back through all the steps I had tried the first time around but with the compiled version and it worked:

    ucc MyScripts.TestCommandlet

    - I was forgetting to tell it where to look for the compiled script. Thank you all very much for the help, I look forward to putting up some fun scripts as soon as I get get my hands a bit dirtier with this code!
    Last edited by Noctifer; 11-08-2006 at 09:50 AM.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.