SQS to SQF conversion: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
Line 106: Line 106:
   [[default]] {DEFAULT_COMMAND};
   [[default]] {DEFAULT_COMMAND};
  };
  };
}}
===Exitting===
{{Box_File|SQS|
?VARIABLE: [[goto]] "Exit"
  COMMAND_1
#Exit
  COMMAND_2
  exit
}}
{{Box_File|SQF|color_dark=#78AF78|color_light=#f2fff2|
[[if]](VARIABLE)[[exitWith]]
{
  COMMAND_2;
};
COMMAND_1;
}}
}}


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

Revision as of 14:01, 2 March 2007

What's different in SQF

  • Every command has to end with semicolon.
  • Cycles with the While-Do structure are limited to 10 000 loops.
  • SQF does not have a goto command anymore.
  • SQF commands can span several lines if they are enclosed in brackets.
  • SQF can return a variable, where SQS cannot.

Replacing

Comment

Template:Box File Template:Box File

Condition

Template:Box File Template:Box File

Delay

Template:Box File Template:Box File

Conditional command

Template:Box File Template:Box File

Multi-conditional command

Template:Box File Template:Box File

Cycle

Template:Box File Template:Box File

Cycle with step

Template:Box File Template:Box File

Structured conditional command

Template:Box File Template:Box File

Exitting

Template:Box File Template:Box File