I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

Unreal Wiki:Scratchpad

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 12:34, 22 June 2008 by Jrubzjeknf (Talk | contribs)

Jump to: navigation, search

This page is for pasting code you want to show someone as an example or to get assistance with. This allows you to easily collaborate with someone to solve a problem, and allows easy comparisons of the edits.

You are free to remove any existing code from below, and paste your code between the <uscript> </uscript> tags. If the page hasn't been edited in the last few hours (the last edit timestamp is 2008-06-22 12:34:42), you can assume it isn't needed anymore and can be removed. A full edit history will be available, so don't worry about losing anything you removed.


// put your code here


<?php
/*************************************************************************************
 * uscript.php
 * ---------------------------------
 * Author: <name> (<e-mail address>)
 * Copyright: (c) 2004 <name> (<website URL>)
 * Release Version: 1.0.0
 * CVS Revision Version: $Revision: 1057 $
 * Date Started: <date started>
 * Last Modified: $Date: 2008-03-16 16:55:34 +0100 (So, 16 Mär 2008) $
 *
 * <name-of-language> language file for GeSHi.
 *
 * <any-comments...>
 *
 * CHANGES
 * -------
 * <date-of-release> (1.0.0)
 *  -  First Release
 *
 * TODO (updated <date-of-release>)
 * -------------------------
 * <things-to-do>
 *
 *************************************************************************************
 *
 *     This file is part of GeSHi.
 *
 *   GeSHi is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   GeSHi is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with GeSHi; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 ************************************************************************************/
 
/*************************************************************************************
 * uscript.php
 * ----------
 * Author: Graham Knop (haarg@beyondunreal.com)
 * Copyright: (c) 2007 Graham Knop
 * Release Version: 0.0.0.1
 * Date Started: 2007/12/17
 *
 * UScript language file for GeSHi.
 *
 ************************************************************************************/
 
 $language_data = array (
    'LANG_NAME' => 'UnrealScript',
    'COMMENT_SINGLE' => array(1 => '//', 2 => '#'),
    'COMMENT_MULTI' => array('/*' => '*/'),
    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    'QUOTEMARKS' => array(1 => '"', 2 => "'"),
    'ESCAPE_CHAR' => '\\',
    'KEYWORDS' => array(
        1 => array(
            'within', 'while', 'void', 'vector4', 'vector2d', 'vector', 'vect', 'var', 'until', 'unreliable'
            , 'twovectors', 'true', 'travel', 'transient', 'tpov', 'then', 'texture', 'switch', 'super'
            , 'structdefaultproperties', 'struct', 'string', 'stop', 'static', 'state', 'sound', 'skip'
            , 'singular', 'simulated', 'showcategories', 'server', 'self', 'scriptconst', 'scale', 'safereplace'
            , 'rotator', 'rotation', 'rot', 'rng', 'return', 'repnotify', 'replication', 'removeitem', 'remove'
            , 'reliable', 'register', 'region', 'rangevector', 'range', 'quat', 'protected', 'private'
            , 'preoperator', 'postoperator', 'pointer', 'plane', 'placeable', 'perobjectlocalized'
            , 'perobjectconfig', 'out', 'optional', 'operator', 'nousercreate', 'notplaceable', 'notforconsole'
            , 'noteditinlinenew', 'nontransient', 'nontransactional', 'none', 'noimport', 'noexport', 'noclear'
            , 'new', 'nativereplication', 'native', 'name', 'mutable', 'model', 'mesh', 'matrix', 'long'
            , 'localized', 'local', 'linearcolor', 'length', 'latent', 'iterator', 'invariant', 'intrinsic'
            , 'intpoint', 'interpcurvepoint', 'interpcurve', 'interp', 'int', 'instanced', 'insertitem'
            , 'insert', 'input', 'init', 'inherits', 'import', 'implements', 'immutable', 'ignores', 'if'
            , 'hideparent', 'hidedropdown', 'hidecategories', 'guid', 'goto', 'globalconfig', 'global'
            , 'function', 'foreach', 'for', 'float', 'find', 'final', 'false', 'extends', 'exportstructs'
            , 'export', 'explicit', 'expands', 'exec', 'event', 'enumcount', 'enum', 'end', 'else', 'editoronly'
            , 'editinlineuse', 'editinlinenotify', 'editinlinenew', 'editinline', 'editfixedsize'
            , 'editconstarray', 'editconst', 'edfindable', 'each', 'duplicatetransient'
            , 'dontcollapsecategories', 'do', 'deprecated', 'dependson', 'delete', 'delegate'
            , 'defaultproperties', 'default', 'databinding', 'cylinder', 'coords', 'continue', 'const', 'config'
            , 'compressedposition', 'color', 'collapsecategories', 'coerce', 'client', 'class', 'catch', 'case'
            , 'cacheexempt', 'byte', 'break', 'boxspherebounds', 'box', 'boundingvolume', 'boundingbox', 'bool'
            , 'begin', 'automated', 'autoexpandcategories', 'auto', 'assert', 'arraycount', 'array', 'always'
            , 'additem', 'add', 'abstract'
            )
        ),
    'SYMBOLS' => array(
        '~=', '~', '||', '|', 'dot', 'cross', 'clockwisefrom', '^^', '^', '@=', '@', '>>>', '>>', '>=', '>'
        , '==', '<=', '<<', '<', '/=', '/', '-=', '--', '-', '+=', '++', '+', '*=', '**', '*', '&&', '&'
        , '%', '$=', '$', '!=', '!'
        ),
    'CASE_SENSITIVE' => array(
        GESHI_COMMENTS => true,
        1 => false,
        2 => false,
        3 => false,
        4 => false,
        5 => false,
        ),
    'STYLES' => array(
        'KEYWORDS' => array(
            1  => 'color: #FF0000; font-weight: bold' # control structures
            ),
        'COMMENTS' => array(
            1 => 'color: #339966; font-style: italic;',
            2 => 'color: #00FF00; font-weight: bold;',
            'MULTI' => 'color: #339966; font-style: italic;'
            ),
        'ESCAPE_CHAR' => array(
            0 => ''
            ),
        'BRACKETS' => array(
            0 => ''
            ),
        'STRINGS' => array(
            1 => 'color: #808080;',
            2 => 'color: #FF0000;'
            ),
        'NUMBERS' => array(
            0 => 'color: #FF00FF;'
            ),
        'METHODS' => array(
            ),
        'SYMBOLS' => array(
            ),
        'REGEXPS' => array(
            ),
        'SCRIPT' => array(
            )
    ),
    'URLS' => array(
        ),
    'OOLANG' => true,
    'OBJECT_SPLITTERS' => array(
        ),
    'REGEXPS' => array(
        ),
    'STRICT_MODE_APPLIES' => GESHI_NEVER,
    'SCRIPT_DELIMITERS' => array(
        ),
    'HIGHLIGHT_STRICT_BLOCK' => array(
        ),
    'TAB_WIDTH' => 4
);
 
?>


struct MapExceptionVehicleSet
{
	var array< class<UTVehicleFactory> > Factories;
	var array< class<UTVehicleFactory> > SwapFactories;
};
 
struct MapExceptionSwapSet
{
	var string Map;
	var MapExceptionVehicleSet MapExctSwapSet[numTeams];
};
var config array<MapExceptionSwapSet> PerMapSwapSet;


PerMapSwapSet=
(
	Map="WAR-DOWNTOWN",
	MapExctSwapSet[0]=
	(
		(Factories="UTGameContent.UTVehicleFactory_Goliath",SwapFactories="Newtators.TSVehicleFactory_Goliath"),
		(Factories="UTGameContent.UTVehicleFactory_Paladin",SwapFactories="Newtators.TSVehicleFactory_Paladin")
	),
	MapExctSwapSet[1]=
	(
		(Factories="UTGameContent.UTVehicleFactory_Nightshade",SwapFactories="Newtators.TSVehicleFactory_Nightshade"),
		(Factories="UTGameContent.UTVehicleFactory_DarkWalker",SwapFactories="Newtators.TSVehicleFactory_DarkWalker")
	)
)


PerMapSwapSet=
(
	Map="WAR-DOWNTOWN",
	MapExctSwapSet[0]=
	(
		(Factories=("UTGameContent.UTVehicleFactory_Goliath","UTGameContent.UTVehicleFactory_Paladin")),
		((SwapFactories=("Newtators.TSVehicleFactory_Goliath","Newtators.TSVehicleFactory_Paladin"))
	),
	MapExctSwapSet[1]=
	(
		(Factories=("UTGameContent.UTVehicleFactory_Nightshade","UTGameContent.UTVehicleFactory_DarkWalker")),
		(SwapFactories=("Newtators.TSVehicleFactory_Nightshade","Newtators.TSVehicleFactory_DarkWalker"))
	)
)


Error: Error, ImportText (MapExctSwapSet): Missing key name in: ((Factories="UTGameContent.UTVehicleFactory_Goliath",SwapFactories="Newtators.TSVehicleFactory_Goliath"),(Factories="UTGameContent.UTVehicleFactory_Paladin",SwapFactories="Newtators.TSVehicleFactory_Paladin")),MapExctSwapSet[1]=((Factories="UTGameContent.UTVehicleFactory_Nightshade",SwapFactories="Newtators.TSVehicleFactory_Nightshade"),(Factories="UTGameContent.UTVehicleFactory_DarkWalker",SwapFactories="Newtators.TSVehicleFactory_DarkWalker")))
Error: Error, ImportText (PerMapSwapSet): Property import failed for MapExctSwapSet in: (Map="WAR-DOWNTOWN",MapExctSwapSet[0]=((Factories="UTGameContent.UTVehicleFactory_Goliath",SwapFactories="Newtators.TSVehicleFactory_Goliath"),(Factories="UTGameContent.UTVehicleFactory_Paladin",SwapFactories="Newtators.TSVehicleFactory_Paladin")),MapExctSwapSet[1]=((Factories="UTGameContent.UTVehicleFactory_Nightshade",SwapFactories="Newtators.TSVehicleFactory_Nightshade"),(Factories="UTGameContent.UTVehicleFactory_DarkWalker",SwapFactories="Newtators.TSVehicleFactory_DarkWalker")))