saveVar: Difference between revisions
Jump to navigation
Jump to search
m (formatted example) |
m (template:command argument fix) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Save variable value into the campaign space. This variable is available to all following missions in the campaign. |= | | Save variable value into the campaign space. This variable is available to all following missions in the campaign. |DESCRIPTION= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| '''saveVar''' varname |= | | '''saveVar''' varname |SYNTAX= | ||
|p1= varname: [[String]] |= | |p1= varname: [[String]] |PARAMETER1= | ||
| [[Nothing]] |= | | [[Nothing]] |RETURNVALUE= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|x1= <pre>saveVar "varOne"</pre> |= | |x1= <pre>saveVar "varOne"</pre> |EXAMPLE1= | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| |= | | |SEEALSO= | ||
}} | }} |
Revision as of 14:46, 7 April 2019
Description
- Description:
- Save variable value into the campaign space. This variable is available to all following missions in the campaign.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
saveVar "varOne"
Additional Information
- See also:
- See also needed
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
- Posted on January 28, 2009 - 22:56 (CET)
- Wolfrug
- If you try to saveVar a vehicle saved in your variable (SavedVars = [Car1]; saveVar "SavedVars"), then Car1 will not be properly "saved", refering to ObjNull if you try to use it in subsequent missions, even if a vehicle with the same vehicle varname exists. To get around this, save the vehicle's varname as a string (SavedVars = [str(Car1)]) and then when you need it just use call compile to "unstring" the varname (_car = call compile (SavedVars select 0);).
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Scripting Commands Arma 3
- Scripting Commands Take On Helicopters