Engine:CCMD varedit: Difference between revisions

No edit summary
Line 21: Line 21:
== Examples ==
== Examples ==
=== Default values ===
=== Default values ===
* 'bob' without a value. Variable 'bob' doesn't exist, and 'bob' is not the name of anything else.
<kua>
<kua>
> bob
> bob
Unknown: bob
Unknown: bob
</kua>
</kua>
* Tries to set variable 'bob' to 'fred'. Fails as 'bob' does not exist.  
'bob' without a value. Variable 'bob' doesn't exist, and 'bob' is not the name of anything else.
<kua>
<kua>
> bob fred
> bob fred
Unknown: bob
Unknown: bob
</kua>
</kua>
* Using the 'set' command to create the variable 'bob' and set to 'fred'.  
Tries to set variable 'bob' to 'fred'. Fails as 'bob' does not exist.  
<kua>
<kua>
> set bob fred
> set bob fred
</kua>
</kua>
* Same as the first example, but now 'bob' exists.
Using the 'set' command to create the variable 'bob' and set to 'fred'.  
<kua>
<kua>
> bob
> bob
'bob' is 'fred'
'bob' is 'fred'
</kua>
</kua>
* Try to set existing 'bob' to 'james', value changes.  
Same as the first example, but now 'bob' exists.
<kua>
<kua>
> bob james
> bob james
Line 46: Line 45:
'bob' is 'james'
'bob' is 'james'
</kua>
</kua>
Try to set existing 'bob' to 'james', value changes.


=== Change if exists ===
=== Change if exists ===