mIRC Home    About    Download    Register    News    Help

Print Thread
add 1 to a variable? #246013 18/05/14 03:29 AM
Joined: Apr 2014
Posts: 19
D
dude22072 Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2014
Posts: 19
currently i tried:
Code:
var %length $readini(quotes.ini, $$3, length)
    var %newlength = %length +1
    msg # %newlength

but what just messages "1 +1" in the chat.
the ini is setup like
Code:
[zackattack9909]
length=2
1="maybe the scripts are broken when I accidentially the whole thing last night?" -May 17th 2014 @ 18:31
2=test

[dude22072]
length=1
1=testaroo

and i wanna add 1 to the length when a quote is added so because my $rand uses "length" for the max value.

Last edited by dude22072; 18/05/14 03:30 AM.
Re: add 1 to a variable? [Re: dude22072] #246014 18/05/14 03:37 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
$calc(%length + 1)


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: add 1 to a variable? [Re: Nillen] #246015 18/05/14 03:42 AM
Joined: Apr 2014
Posts: 19
D
dude22072 Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Apr 2014
Posts: 19
Thanks so much, you've been an awesome help tonight.