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
Profile E-Mail PM Find Quote Report
Eljay
Elite Member
*****

Avatar
:O

Posts: 2949
Reputation: 77
– / Male / –
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
Profile PM Find Quote Report
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
Profile E-Mail PM Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
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.
[Image: 1-0.png]
             
06-27-2006 10:48 AM
Profile PM Web Find Quote Report
hpzone
New Member
*


Posts: 4
Joined: Jun 2006
O.P. RE: Variable + 1?
Thanks, it worked :)
06-27-2006 10:48 AM
Profile E-Mail PM Find Quote Report
« 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:

Forum Jump:

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