What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » if (strcmp(sCommandArg, "") == 0), which it never does...

if (strcmp(sCommandArg, "") == 0), which it never does...
Author: Message:
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
O.P. if (strcmp(sCommandArg, "") == 0), which it never does...
Can someone please help me figure out why
code:
if (strcmp(sCommandArg, "") == 0)
never evaluates to 'TRUE'?
*-)
Or do I just not know how to use pointers properly?
[Image: spartaafk.png]
11-21-2003 09:46 PM
Profile PM Web Find Quote Report
dilated
Junior Member
**


Posts: 17
Joined: Nov 2003
RE: if (strcmp(sCommandArg, "") == 0), which it never does...
u need to rectify the variable
11-21-2003 10:48 PM
Profile E-Mail PM Find Quote Report
Meksilon
Full Member
***

Avatar


Posts: 344
Reputation: 1
40 / Male / –
Joined: Oct 2002
RE: if (strcmp(sCommandArg, "") == 0), which it never does...
Probably because Patchou rejects commands with no param if it's supposed to have one.
11-22-2003 02:12 AM
Profile PM Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
O.P. RE: if (strcmp(sCommandArg, "") == 0), which it never does...
I seem to have forgotten to mention sCommandArg is a pointer.

quote:
u need to rectify the variable

How?

quote:
Probably because Patchou rejects commands with no param if it's supposed to have one.

I have tested this, and I found that when no argument is supplied, *sCommandArg is the NULL character.
[Image: spartaafk.png]
11-22-2003 03:12 PM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
O.P. RE: if (strcmp(sCommandArg, "") == 0), which it never does...
if (strlen(sCommandArg) == 0), which it does with no arguments. I should have used that to start off with really.
[Image: spartaafk.png]
11-25-2003 10:10 AM
Profile PM Web 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