23 Feb, 2010, jurdendurden wrote in the 1st comment:
Votes: 0
Not sure why, as I'm doing this the same way as I do in every other function that requires more than one argument from the user.. but in my attempt to upgrade my homebrew quest code (so players can be on multiple quests at once, etc..), I'm running into the problem where the code is ignoring the second argument check. Below is a small snip of the code, showing the check for a null arg2, which doesn't seem to be getting hit on when in game.

if (!str_cmp (arg, "info"))
{
if (arg2[0] == '\0')
{
SEND("Which quest do you want info on?\r\n",ch);
return;
}



It's not making them specify which quest they want info on basically, any ideas? Do I need to post more of the code for people to see?
23 Feb, 2010, Runter wrote in the 2nd comment:
Votes: 0
Well, if the question is in regards to arg2 my advice would be to figure out what arg2 actually contains. This is most easily done if you're using a debugger. (p arg2)

If you post the entire command perhaps I could help more just by seeing it—I'd do it in the pastebin.
23 Feb, 2010, jurdendurden wrote in the 3rd comment:
Votes: 0
Ok I ran it through GDB with breakpoints in the right spots and I'm getting like 5 lines of gibberish for the value of arg2 AND arg so I might be doing something wrong there?
Also added the code to the pastebin for the corresponding problem, here is the link. Thanks for any help.
23 Feb, 2010, jurdendurden wrote in the 4th comment:
Votes: 0
Ok figured it out. This was actually kind of silly. So… here's the problem:

one_argument (argument, arg);	
one_argument (argument, arg2);


is actually supposed to be:

argument = one_argument (argument, arg);	
argument = one_argument (argument, arg2);


Thanks though Runter!
0.0/4