27 Nov 11, 11:50PM
Hi all.
I come from a C++ background so I am wondering what syntax declares a variable that can be recalled later.
From what I've seen alias declares variables/commands and echo can print the contents of that but I can't seem to get that to work.
I like the Cubescript reference but I found it hard to learn the bare basics of the syntax from it.
E.G.
[cubescript]// This file gets executed every time you start AssaultCube.
// This is where you should put any scripts you may have created for AC.
alias test 67 //I'm trying to declare a variable and assign a value to it
alias testscript
[
echo test //I'm trying to print the value of that variable
]
docident testscript "Test Script" //I'm trying to document this so it come up with the description when I type it[/cubescript]
It would appear [ and ] are the equivalent of { and } and semicolons are not required?
When I create a variable how do I specify between strings, integers, and floats?
I come from a C++ background so I am wondering what syntax declares a variable that can be recalled later.
From what I've seen alias declares variables/commands and echo can print the contents of that but I can't seem to get that to work.
I like the Cubescript reference but I found it hard to learn the bare basics of the syntax from it.
E.G.
[cubescript]// This file gets executed every time you start AssaultCube.
// This is where you should put any scripts you may have created for AC.
alias test 67 //I'm trying to declare a variable and assign a value to it
alias testscript
[
echo test //I'm trying to print the value of that variable
]
docident testscript "Test Script" //I'm trying to document this so it come up with the description when I type it[/cubescript]
It would appear [ and ] are the equivalent of { and } and semicolons are not required?
When I create a variable how do I specify between strings, integers, and floats?