Engine:CCMD var: Difference between revisions

116 bytes added ,  14 October 2023
Line 10: Line 10:
* 'var' called with 'bob' without a value. Variable 'bob' doesn't exist.
* 'var' called with 'bob' without a value. Variable 'bob' doesn't exist.
<kua>
<kua>
:var bob
> var bob
Unknown: bob
Unknown: bob
</kua>
</kua>
* Creates variable 'bob' and sets to 'fred'.  
* Creates variable 'bob' and sets to 'fred'.  
<kua>
<kua>
:var bob fred
> var bob fred
</kua>
</kua>
* Same as the first example, but now bob exists.   
* Same as the first example, but now bob exists.   
<kua>
<kua>
:var bob
> var bob
'bob' is 'fred'
</kua>
* Try to set 'bob' to 'james', but 'bob' is already set.
<kua>
> var bob james
> var bob
'bob' is 'fred'
'bob' is 'fred'
</kua>
</kua>