User Tools

Site Tools


scripting:system_values_functions_overview

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:system_values_functions_overview [2020/01/28 17:50] – external edit 127.0.0.1scripting:system_values_functions_overview [2020/01/28 18:02] (current) – [System Variables] 51.148.136.100
Line 4: Line 4:
 e.g.  ''$gPlayerAge'' tells you the age of the current player. Here's a quick example of how you might use that e.g.  ''$gPlayerAge'' tells you the age of the current player. Here's a quick example of how you might use that
  
-<codedoc>+<code>
   $myvar = $gPlayerAge + 1   $myvar = $gPlayerAge + 1
   *say Next birthday, %PLAYER% will be $myvar years old   *say Next birthday, %PLAYER% will be $myvar years old
-</codedoc>+</code>
  
 For a full list of the system values available, see the [[Scripting:Reference:System  For a full list of the system values available, see the [[Scripting:Reference:System 
Line 18: Line 18:
 For example, to find out how much of a particular item the current player has : For example, to find out how much of a particular item the current player has :
  
-<codedoc>+<code>
   $numInInv = sysPlayerInventory( "Wood" )   $numInInv = sysPlayerInventory( "Wood" )
   *say %PLAYER% is currently carrying $numInInv Wood   *say %PLAYER% is currently carrying $numInInv Wood
-</codedoc>+</code>
  
 The reference section contains a [[Scripting:Reference:System Functions|full list of System Functions]]. The reference section contains a [[Scripting:Reference:System Functions|full list of System Functions]].
Line 37: Line 37:
 For example: For example:
  
-<codedoc>+<code>
   $gServerKey[Hello] = "Your personalised random number is "   $gServerKey[Hello] = "Your personalised random number is "
   $gPlayerKey[1] = sysRand( 100 )   $gPlayerKey[1] = sysRand( 100 )
   *say Hi %PLAYER%. $gServerKey[Hello] $gPlayerKey[1].   *say Hi %PLAYER%. $gServerKey[Hello] $gPlayerKey[1].
-</codedoc>+</code>
 .. this would print ''Hi [Player_Name]. Your personalised random number is [1-100]''. .. this would print ''Hi [Player_Name]. Your personalised random number is [1-100]''.
  
scripting/system_values_functions_overview.1580255406.txt.gz · Last modified: 2020/01/28 17:50 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki