I don't need to test my programs. I have an error-correcting modem.
Difference between revisions of "Comments"
From Unreal Wiki, The Unreal Engine Documentation Site
ErortRclib (Talk | contribs) m (moneltoubo) |
m (Reverted edits by ErortRclib (Talk); changed back to last version by Azrael) |
||
Line 1: | Line 1: | ||
− | |||
'''Comments''' are a way of inserting text into [[UnrealScript]] code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text. | '''Comments''' are a way of inserting text into [[UnrealScript]] code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text. | ||
Revision as of 15:37, 5 December 2008
Comments are a way of inserting text into UnrealScript code to remind yourself of what the code is doing, or to give a summary of the code file. Comments will be ignored by the compiler, so they can also be used to temporarily 'disable' a line of text.
Anything on a line after the special comment symbol // is a comment. For example, many official Unreal Tournament files have headers such as this:
//============================================================================= // A sticky note. Level designers can place these in the level and then // view them as a batch in the error/warnings window. //============================================================================= class Note extends Actor placeable native; #exec Texture Import File=Textures\Note.pcx Name=S_Note Mips=Off MASKED=1 var() string Text;
To disable a line of text, simple insert the // before it, like this:
simulated function ShaderAction( Shader sh ) { //log("ShaderAction " $ sh ); switch( MatTriggerAction ) { case MTA_SwapShaderSpecular: sh.Specular = SwapMaterialA; break; } }