From WikiChip
Difference between revisions of "mirc/commands/hdec"
m (Bot: Adding a template) |
m (Bot: Fixing links) |
||
Line 52: | Line 52: | ||
* [[$hget identifier - mIRC|$hget]] | * [[$hget identifier - mIRC|$hget]] | ||
* [[$hfind identifier - mIRC|$hfind]] | * [[$hfind identifier - mIRC|$hfind]] | ||
− | * | + | * {{mIRC|/hadd}} |
− | * | + | * {{mIRC|/hdel}} |
− | * | + | * {{mIRC|/hfree}} |
− | * | + | * {{mIRC|/hinc}} |
− | * | + | * {{mIRC|/hload}} |
− | * | + | * {{mIRC|/hmake}} |
− | * | + | * {{mIRC|/hsave}} |
{{mIRC command list}} | {{mIRC command list}} | ||
[[Category:MIRC commands]] | [[Category:MIRC commands]] |
Revision as of 18:41, 5 July 2014
The /hdec command decreases the value of a key by [num]. If the value is not specified, the default value is 1.0.
Synopsis
/hdec [-mszu#] <key> [num] /hdec -b[cmszu#]Switches
- -m - Creates the hash table if it does not exist
- -s - Displays the assignment information
- -b - Treats the value as a binary variable
- -c - Truncates the &bvar at the first null value
- -z - Decreases the value by 1.0 every second; stops at zero
- -u# - Removes the key/value after # seconds
Parameters
Example
alias countdown { ;adds the item down with a value of 10 to the table count hadd -m count down 10 echo -a $hget(count,down) $+ ! :repeat ;checks if the value of down returns true if ($hget(count,down) > 1) { ;decreases down by 1 hdec count down ;echos the current count echo -a $hget(count,down) $+ ! ;repeats goto repeat } ;if the previous if statement returns false it carries on with this. else echo -a 0, Hurray! hfree -s count }
Compatibility
Added: mIRC v6.0
Added On: 03/02/2002
Note: Individual switches were not taken into consideration.
See also
mIRC commands list