Questions
All right have you seen when you enter code that if you enter more than one function and put else then it doesn't work???? well here is how to deal with it
example
[CODE]
if global.good=true
{
show_message("thats good")
x+=3
}
else
show_message("your a sad sack today")
[/CODE]
If using a variable remember to init it in create event before you do something like the code above.
2. Using it with functions
The best type of function i think to use with brackets are questions (e.g show_question)
because it is easy to use with brackets example
[CODE]
show_question("do you want to init a tcp/ip connection???")
{
ip=get_string("ip address",'')
mplay_init_tcpip(ip)
}
else
{
game_end()
}
[/CODE]
So there you have it a simple turtorial on brackets
example
[CODE]
if global.good=true
{
show_message("thats good")
x+=3
}
else
show_message("your a sad sack today")
[/CODE]
If using a variable remember to init it in create event before you do something like the code above.
2. Using it with functions
The best type of function i think to use with brackets are questions (e.g show_question)
because it is easy to use with brackets example
[CODE]
show_question("do you want to init a tcp/ip connection???")
{
ip=get_string("ip address",'')
mplay_init_tcpip(ip)
}
else
{
game_end()
}
[/CODE]
So there you have it a simple turtorial on brackets
Labels: Novice
