GetRuleValue: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
[[Category:Incomplete]]
[[Category:Need Syntax]]
__NOTOC__  
__NOTOC__  
This function is for blahblah.. not defined yet
This function gets a rule value. A rule value is a string that can be viewed by server browsers and used for filtering the server list.


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
INSERT SYNTAX HERE              
strig getRuleValue ( string key )              
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''key:''' The name of the rule
 
*'''value:'''The value you wish to set for the rule
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' descriptiona
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns ''true'' if the rule value was set, ''false'' if invalid arguments were specified.


==Example==  
==Example==  
This example does...
This example shows how you can check if a rule is set.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
if ( getRuleValue ( "myScriptRunning" ) ~= false )
blabhalbalhb --abababa
    -- the value is set
--This line does this...
end
mooo
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{FunctionArea_Functions}}
{{ASE_functions}}

Revision as of 11:07, 12 September 2006

This function gets a rule value. A rule value is a string that can be viewed by server browsers and used for filtering the server list.

Syntax

strig getRuleValue ( string key )              

Required Arguments

  • key: The name of the rule
  • value:The value you wish to set for the rule

Returns

Returns true if the rule value was set, false if invalid arguments were specified.

Example

This example shows how you can check if a rule is set.

if ( getRuleValue ( "myScriptRunning" ) ~= false )
    -- the value is set
end

See Also

Template:ASE functions