| View previous topic :: View next topic |
| Author |
Message |
kopelito Master Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 483
|
Posted: Tue May 13, 2008 7:23 am Post subject: [C++] Easy coding help |
|
|
In the following script:
| Code: | | sprintf_s(text, 999, "%s need Help from GM",player->getName() ); |
What does the 'text,999' means?
|
|
| Back to top |
|
 |
Ferocious Advanced Cheater
Reputation: 0
Joined: 06 Feb 2008 Posts: 54
|
|
| Back to top |
|
 |
Estx Expert Cheater
Reputation: 0
Joined: 04 Mar 2008 Posts: 172
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
kopelito Master Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 483
|
Posted: Tue May 13, 2008 8:55 am Post subject: |
|
|
Thanks for helping my guys.
But I have nother problem:
Whats wrong with this code?
| Code: | | sprintf_s(text, 999,next_token "Is now moved to henesys",player->getName() ); |
I made a command in maplestory that moves people to henesys when I write
!move Player
then I want a notice message saying 'Player is now moved to henesys'.
Player is a name of course.
|
|
| Back to top |
|
 |
Symbol I'm a spammer
Reputation: 0
Joined: 18 Apr 2007 Posts: 5094 Location: Israel.
|
Posted: Tue May 13, 2008 8:58 am Post subject: |
|
|
You can't do that, the third parameter is a string.
Try:
| Code: | | sprintf_s(text, 999, "%s is now at %s",player->getName(), next_token, map_name); |
I don't know how to get map's name... check '/find' function.
|
|
| Back to top |
|
 |
kopelito Master Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 483
|
Posted: Tue May 13, 2008 9:30 am Post subject: |
|
|
So, if ill do like "!move Damn"
Is it impossible to print "Damn is now moved..."?
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Tue May 13, 2008 3:52 pm Post subject: |
|
|
| kopelito wrote: | So, if ill do like "!move Damn"
Is it impossible to print "Damn is now moved..."? |
Just edit the printout to say what you need, then remove the extra vars at the end:
| Code: | | sprintf_s( text, 999, "%s is now moved...", player->GetName() ); |
_________________
- Retired. |
|
| Back to top |
|
 |
kopelito Master Cheater
Reputation: 0
Joined: 20 Apr 2007 Posts: 483
|
Posted: Wed May 14, 2008 11:31 am Post subject: |
|
|
Ok, got it solved.
The problem is now solved :]
Thanks ppl!
|
|
| Back to top |
|
 |
|