Statement: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (cleanup)
m (Some wiki formatting)
Line 1: Line 1:
__NOTOC__
__NOTOC__
A '''statement''' is a piece of scripting code. It is an '''instruction''' to the script Interpreter and tells it to do something.
A '''statement''' is a piece of scripting code. It is an '''instruction''' to the script Interpreter and tells it to do something.


== Types of Statements ==
== Types of Statements ==
=== Value Assignment ===
=== Value Assignment ===
A [[Operators#Assignment Operators|value assignment]] to a [[Variables|variable]].
A [[Operators#Assignment Operators|value assignment]] to a [[Variables|variable]].


Line 9: Line 12:


=== Control Structure ===
=== Control Structure ===
Any [[Control Structures|control structure]] including its blocks.
Any [[Control Structures|control structure]] including its blocks.


  [[if]] (_value > _limit) [[then]]
  [[if]] (_value > _limit) [[then]]
  {
  {
    [[hint]] "oh no";
[[hint]] "oh no";
  };
  };


=== Command ===
=== Command ===
Any [[:Category:Scripting Commands|scripting command]] including its [[Argument|arguments]].
Any [[:Category:Scripting Commands|scripting command]] including its [[Argument|arguments]].


  [[player]] [[sideChat]] "hello";
  [[player]] [[sideChat]] "hello";


[[Category: Syntax]]
[[Category: Syntax]]

Revision as of 06:46, 30 October 2021

A statement is a piece of scripting code. It is an instruction to the script Interpreter and tells it to do something.


Types of Statements

Value Assignment

A value assignment to a variable.

_variable = 5;

Control Structure

Any control structure including its blocks.

if (_value > _limit) then
{
	hint "oh no";
};

Command

Any scripting command including its arguments.

player sideChat "hello";