Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

/find command [1.5]

Joined
Jul 11, 2012
Messages
786
Reaction score
190
Yeah yeah whatever people, some new members are asking me for these stuff, believe it or not !
So a quick kick off, just no intro, or anything else -.-

ZChat_Cmds.cpp
Code:
void ChatCmd_FindPlayer(const char* line, const int argc, char **const argv);
Code:
_CC_AC("find", &ChatCmd_FindPlayer, CCF_ALL, 1, 1, true, "/find <charname>", "");
Code:
void ChatCmd_FindPlayer(const char* line,const int argc, char **const argv)
{
       ZPostWhere(argv[1]);
}

Save > Build > Run..
Obviously ya'll know what's this, usage: /find <player_name>
Done, Peace :):
 
Last edited:
Newbie Spellweaver
Joined
Apr 1, 2011
Messages
85
Reaction score
38
All of this is unnecessary
Code:
	if(argc < 2)
	{
		sprintf(szMsg, "^2Usage: /find <charname>");
		ZChatOutput(szMsg);
		return;
	}

Just change the "ARGVNoMin" to have a minimum of 1 and then it'll automatically output the useage.

That's why that's there.
 
Joined
Jul 11, 2012
Messages
786
Reaction score
190
All of this is unnecessary
Code:
	if(argc < 2)
	{
		sprintf(szMsg, "^2Usage: /find <charname>");
		ZChatOutput(szMsg);
		return;
	}

Just change the "ARGVNoMin" to have a minimum of 1 and then it'll automatically output the useage.

That's why that's there.
I know this, u didn't give me something new :): .. just wanted to add this line for fun xD
You know that each command could be done in 1000... ways, i don't have to tell that to someone like you, and u also should'vr known that i knew this ez stuff :/
 
Custom Title Activated
Loyal Member
Joined
Feb 18, 2012
Messages
1,433
Reaction score
391
I know this, u didn't give me something new :): .. just wanted to add this line for fun xD
You know that each command could be done in 1000... ways, i don't have to tell that to someone like you, and u also should'vr known that i knew this ez stuff :/

I'm not being rude but you wouldn't just add a line in for fun, you would try and make the code look as neat as possible, you didn't know that.

But thanks a bunch for the release, all is useful in this community.
 
Joined
Jul 11, 2012
Messages
786
Reaction score
190
I'm not being rude but you wouldn't just add a line in for fun, you would try and make the code look as neat as possible, you didn't know that.

But thanks a bunch for the release, all is useful in this community.

Bro i don't mean any offense either but i DID add it for fun, just to remind you i am NOT the old Tannous u used to know 2 or 1 years ago...
Now i can do w/e i want, without asking anyone...
Just to let u know i am learning CS done 1st year tho.
So don't try to be smart and decide by your self, and yeah think whatever u want to think, in the end i know that i knew this. Not begging u to believe me :):
No offense again, peace mate <3
 
Newbie Spellweaver
Joined
Apr 1, 2011
Messages
85
Reaction score
38
I know this, u didn't give me something new :): .. just wanted to add this line for fun xD
You know that each command could be done in 1000... ways, i don't have to tell that to someone like you, and u also should'vr known that i knew this ez stuff :/

I don't give a poop if you knew it or not, I'm correcting the code you wrote and left here.
It's not necessary and should not have been added in the first place.
 
Newbie Spellweaver
Joined
Feb 19, 2012
Messages
12
Reaction score
2
Code:
...
	char szMsg[256];
	if(argc < 2)
	{
		sprintf(szMsg, "^2Usage: /find <charname>");
		ZChatOutput(szMsg);
		return;
	}
...
Can't quite wrap my head around why you used sprintf to format a static string into a fixed-size buffer (which is obviously waaaaaay too big for the string (you already know the length of the string; it's static (also more parentheses wooo))).
 
Joined
Jul 11, 2012
Messages
786
Reaction score
190
You guys just need to chill, i don't care what do you tell me, due to the fact that i know rvery single word you wrote. And just to mention, i decide the way i want to show my self NOT you :): and i don't care what do you think either.
So just as Phoenix said once, "i'm closing this thread before it's out of control".. but since i can't close it, i'm ENDING THIS DISCUSSION before it gets out of control. Think w/e you want, ROFL, like ffs i give a sh!t
 
Newbie Spellweaver
Joined
Feb 19, 2012
Messages
12
Reaction score
2
You guys just need to chill, i don't care what do you tell me, due to the fact that i know rvery single word you wrote. And just to mention, i decide the way i want to show my self NOT you :): and i don't care what do you think either.
So just as Phoenix said once, "i'm closing this thread before it's out of control".. but since i can't close it, i'm ENDING THIS DISCUSSION before it gets out of control. Think w/e you want, ROFL, like ffs i give a sh!t
Code:
char Tannous[2048 * 1024];
sprintf(Tannous, "Knock knock open up the door it's real. With the non-stop pop pop and stainless steel");
__asm 
{
nop;
}
printf("%s", Tannous);

liek if u cried
1 like = 1 rip
 
Newbie Spellweaver
Joined
Apr 4, 2014
Messages
23
Reaction score
12
You guys just need to chill, i don't care what do you tell me, due to the fact that i know rvery single word you wrote. And just to mention, i decide the way i want to show my self NOT you :): and i don't care what do you think either.
So just as Phoenix said once, "i'm closing this thread before it's out of control".. but since i can't close it, i'm ENDING THIS DISCUSSION before it gets out of control. Think w/e you want, ROFL, like ffs i give a sh!t
The point is, every single snippet of code you've posted so far is absolutely atrocious, and yet you refuse to accept tips from people that are clearly far better than you at programming, and go "LALALA I CAN'T HEAR YOU STOP BEING MEAN TO ME". With this kind of attitude, you'll never achieve anything in this industry.
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Code:
char Tannous[2048 * 1024];
sprintf(Tannous, "Knock knock open up the door it's real. With the non-stop pop pop and stainless steel");
__asm 
{
nop;
}
printf("%s", Tannous);

liek if u cried
1 like = 1 rip

I love how you added a semicolon after nop because that's obviously what you do in ASM! No, seriously, don't show off with code that you have no knowledge of.

Also, keep all of your ego's down, they're useless and make no sense against oldgen developers that actually do know their stuff.
 
Newbie Spellweaver
Joined
Feb 19, 2012
Messages
12
Reaction score
2
I love how you added a semicolon after nop because that's obviously what you do in ASM! No, seriously, don't show off with code that you have no knowledge of.

Also, keep all of your ego's down, they're useless and make no sense against oldgen developers that actually do know their stuff.

Tannous - /find command [1.5] - RaGEZONE Forums


Anyway, the whole idea at first wasn't to poke fun at him, it was to point things out that he should do to improve his releases. It's all fine and dandy for him to say "if you want secure code, then secure it yourself" but the fact of the matter is that if someone knew how to make his code better then they would be capable of writing it themselves. Yes, he's done some things that a lot of people wouldn't do, and it's obvious that he's new to programming, but people are giving him advice and he's just brushing it off and making excuses rather than actually taking peoples suggestions into consideration. There are many ways of doing things and nobody knows everything; so people should always be open to help and advice from others; even seasoned programmers make mistakes.
 
Last edited:
Joined
Jul 11, 2012
Messages
786
Reaction score
190
Tannous - /find command [1.5] - RaGEZONE Forums


Anyway, the whole idea at first wasn't to poke fun at him, it was to point things out that he should do to improve his releases. It's all fine and dandy for him to say "if you want secure code, then secure it yourself" but the fact of the matter is that if someone knew how to make his code better then they would be capable of writing it themselves. Yes, he's done some things that a lot of people wouldn't do, and it's obvious that he's new to programming, but people are giving him advice and he's just brushing it off and making excuses rather than actually taking peoples suggestions into consideration. There are many ways of doing things and nobody knows everything; so people should always be open to help and advice from others; even seasoned programmers make mistakes.

JOKE, and being rude.. anyways not gonna reply.
if you really think i'm noob, NOT forcing you to change your mind. just don't say i have a bad attitude cuz i never, humiliated you <3 (that's insulting what r u doing now) !!!
 
Newbie Spellweaver
Joined
Feb 19, 2012
Messages
12
Reaction score
2
JOKE, and being rude.. anyways not gonna reply.
if you really think i'm noob, NOT forcing you to change your mind. just don't say i have a bad attitude cuz i never, humiliated you <3 (that's insulting what r u doing now) !!!

Everyone has to start somewhere, which is why I wouldn't poke fun at people for making silly mistakes or doing things sub-optimally. However, I do when people ignore valid advice given to them and make up excuses. Arrogance will get you nowhere.

Also, just for the record you said that you weren't going to reply but in order to state that you weren't going to reply you actually replied ;)
 
Newbie Spellweaver
Joined
Apr 4, 2014
Messages
23
Reaction score
12
I love how you added a semicolon after nop because that's obviously what you do in ASM! No, seriously, don't show off with code that you have no knowledge of.

Also, keep all of your ego's down, they're useless and make no sense against oldgen developers that actually do know their stuff.
Keep in mind that there's a difference between "ego" and constructive criticism. In this case:
1) Allocating too much memory for a static-sized string.
2) Using sprintf for a static string
3) Usage could be printed automatically by following Killer1478's suggestion
4) Casting a const char* to a char* and then casting it back to a const char*
His entire function could literally be done like this
Code:
void ChatCmd_FindPlayer(const char* line,const int argc, char **const argv)
{
    ZPostWhere(argv[1]);
}
 
Last edited:
Junior Spellweaver
Joined
Feb 4, 2008
Messages
122
Reaction score
148
I think everyone here is well aware of all you work and recent releases and respect you for that, but your attitude isn't good. If someone give tips based on the code you posted, even if it is useless for you, it can be useful for someone who wishes to use the code and also can learn with that.
Also I have to say that write bad code isn't bad if you have people to give you tips and make you improve your skills. In some circumstances everyone can write bad code because noone knows everything or writes perfect code, I can say this for myself, but is your attitude what makes it a good or bad thing.
I like the concept behind the following phrase:
Junior engineers solve simple problems in a complex way, Master engineers solve complex problems in a simple way.
Even being the 'Junior' or 'Master' doesn't mean you're bad, mean you're leaning and I'm not ashamed of learning.

That said, I hope you take this thread in a good way and keep with your releases.
 
Joined
Jul 11, 2012
Messages
786
Reaction score
190
just cuz 1 guy said my attitude was bad, now everyone is being "albert einstein", people stop this i didn't be any arrogant or any ignorance, you are the ones who r like this !!! all i said was i want to do this the way i want, you can't force me.
it's NOT a "MUST" issue, it's a "SHOULD" issue...
 
Newbie Spellweaver
Joined
Apr 4, 2014
Messages
23
Reaction score
12
just cuz 1 guy said my attitude was bad, now everyone is being "albert einstein", people stop this i didn't be any arrogant or any ignorance, you are the ones who r like this !!! all i said was i want to do this the way i want, you can't force me.
it's NOT a "MUST" issue, it's a "SHOULD" issue...
People are merely trying to help you, yet you're too dense to see that.
 
Joined
Jul 11, 2012
Messages
786
Reaction score
190
People are merely trying to help you, yet you're too dense to see that.

Okay, let's kick this off, with i'm sorry, want me to admit (by forcing) that i have a bad attitude, you got that sir.
now help me, advise me. i'm doing whatever you say :/
if a poop stupid code i posted will make me an enemy to everyone, and get me hated by everyone, then duck IT.
I prefer to have friends here and good relations with the members, upon this poop code !
so sorry if you think i was so arrogant that i didn' accept an advise :):
 
Praise the Sun!
Loyal Member
Joined
Dec 4, 2007
Messages
2,502
Reaction score
986
Tannous - /find command [1.5] - RaGEZONE Forums


Anyway, the whole idea at first wasn't to poke fun at him, it was to point things out that he should do to improve his releases. It's all fine and dandy for him to say "if you want secure code, then secure it yourself" but the fact of the matter is that if someone knew how to make his code better then they would be capable of writing it themselves. Yes, he's done some things that a lot of people wouldn't do, and it's obvious that he's new to programming, but people are giving him advice and he's just brushing it off and making excuses rather than actually taking peoples suggestions into consideration. There are many ways of doing things and nobody knows everything; so people should always be open to help and advice from others; even seasoned programmers make mistakes.

Keep in mind that there's a difference between "ego" and constructive criticism. In this case:
1) Allocating too much memory for a static-sized string.
2) Using sprintf for a static string
3) Usage could be printed automatically by following Killer1478's suggestion
4) Casting a const char* to a char* and then casting it back to a const char*
His entire function could literally be done like this
Code:
void ChatCmd_FindPlayer(const char* line,const int argc, char **const argv)
{
    ZPostWhere(argv[1]);
}

Don't get me wrong, I agree with both of you. But you'll also have to agree with me on the fact that the average attitude on this forum is awful and that does not exclude this thread.

I admit that the code OP posted is wrong and so was his reaction to the constructive criticism that was posted. But whoever posted the constructive criticism made the very same mistake and didn't respond properly either. If someone doesn't want to take your critisim then you just leave him be and he'll never, ever take a step forward in programming. That's his problem and not yours. You should definitely not keep pushing your arguments as it's a waste of time and only provokes this kind of fights. That's why I told all of them to keep the ego's down, OP for not being able to handle criticism and whoever posted criticism for not accepting that OP can't handle it and therefore feeling the need to push their criticism.
 
Back
Top