From WikiChip
Difference between revisions of "mirc/commands/inc"
(Change -z description to 'decreases' from 'increases') |
|||
Line 3: | Line 3: | ||
== Synopsis == | == Synopsis == | ||
− | /inc [- | + | /inc [-sczeuNk] <%var> [value] |
== Switches == | == Switches == | ||
Line 10: | Line 10: | ||
* '''-z''' - Decreases the variable every second until it reaches zero at which point the variable will get removed. | * '''-z''' - Decreases the variable every second until it reaches zero at which point the variable will get removed. | ||
* '''-e''' - Unsets the variable when mIRC exits | * '''-e''' - Unsets the variable when mIRC exits | ||
− | * '''-uN''' - Increases the variable once and unsets the variable after N seconds. | + | * '''-uN''' - Increases the variable once and unsets the variable after N seconds |
+ | * '''-k''' - Keeps the unset time of the variable if it exists. Watch out, currently -k in /inc does not behave the same as in {{mIRC|/set}}, as in, if you provide another -uN switch AND a -k switch, it will use this new unset time and won't preserve the original one. | ||
== Parameters == | == Parameters == |
Revision as of 13:38, 15 January 2016
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
Template:mIRC menu The /inc command increases the value of a variable by a given value. If no value is specified, mIRC will increase the variable by one. The /inc command works with both positive and negative values alike.
Synopsis
/inc [-sczeuNk] <%var> [value]
Switches
- -c - Increases the variable once per second
- -s - Prints out the value of the variable
- -z - Decreases the variable every second until it reaches zero at which point the variable will get removed.
- -e - Unsets the variable when mIRC exits
- -uN - Increases the variable once and unsets the variable after N seconds
- -k - Keeps the unset time of the variable if it exists. Watch out, currently -k in /inc does not behave the same as in /set, as in, if you provide another -uN switch AND a -k switch, it will use this new unset time and won't preserve the original one.
Parameters
- %var - The variable's name
- [value] - Optional numeric value to increase the variable by
Example
Alias Example { ;Create a local variable and set it to 5 var %x 5 ;Increase %x by 5 inc %x 5 ;Print out %x's content echo -a %x }
Compatibility
Added: mIRC v4.0
Added on: 20 Mar 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also
mIRC commands list