Shoutbox
latest posts
member list
search
rules
contact
login
|
register
|
shoutbox
What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox
»
MsgHelp Archive
»
Messenger Plus! for Live Messenger
»
Scripting
» Variable + 1?
Variable + 1?
Author:
Message:
hpzone
New Member
Posts: 4
Joined: Jun 2006
O.P.
Variable + 1?
If the variable Sendmessageaway is declared like this:
var Sendmessageaway = "0";
How can I make it go up by 1 when I send a message to somebody?
Sendmessageaway++;
Sendmessageaway = Sendmessageaway + 1;
Sendmessageaway + 1;
Those didn't work!
06-27-2006 10:42 AM
Eljay
Elite Member
:O
Posts: 2949
Reputation:
77
– /
/ –
Joined: May 2004
RE: Variable + 1?
youre declaring it as a string and incrementing only works with numbers.
var Sendmessageaway = 0;
Sendmessageaway++;
will work
06-27-2006 10:44 AM
Yomeh
New Member
Posts: 5
Joined: Jun 2006
RE: Variable + 1?
Its because you dont declare integers with "" just
code:
var Sendmessageaway = 0;
var Sendmessageaway++; // that should work
This post was edited on 06-27-2006 at 10:47 AM by
Yomeh
.
06-27-2006 10:46 AM
Ezra
Veteran Member
Forgiveness is between them and God
Posts: 1960
Reputation:
31
37 /
/
Joined: Mar 2003
RE: Variable + 1?
Or use ParseInt(variable) to get the numbers from a string.
Also check out my script:
http://shoutbox.menthix.net/showthread.php?tid=61...d=677157#pid677157
That is used to count the number of messages send, it might help you create yours.
06-27-2006 10:48 AM
hpzone
New Member
Posts: 4
Joined: Jun 2006
O.P.
RE: Variable + 1?
Thanks, it worked
06-27-2006 10:48 AM
«
Next Oldest
Return to Top
Next Newest
»
Threaded Mode
|
Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe
|
Add to Favorites
Rate This Thread:
Select Rating...
5 ... Best
4
3 ... Average
2
1 ... Worst
Forum Jump:
Please select one:
--------------------
Latest Posts
Private Messages
User Control Panel
Who's Online
Search
Forum Home
Open Forum
Forum Rules:
You
cannot
post new threads
You
cannot
post replies
You
cannot
post attachments
You
can
edit your posts
HTML is
Off
myCode is
On
Smilies are
On
[img] Code is
On