I wasn't starting a fight, though your looking for one. So i'll say this, even I don't usually post fixes to people unless I know they are right, as in seen a person far better than me do it aswell, and i've been programming about 4 years. I'm saying this not to put you down or anything, its just its bad to teach people bad practices, and if you don't know it all yourself its pretty good to say not to do it. So its safe to say leave it to the pros, like PIS, since 99.99% of the time there answer will be better, and i'm sure none of us will ever see that 0.01% chance.
And don't worry, none taken.
So my snippet wasn't the most efficient for its function. It's not like it would've bogged down his game so much it'd be totally useless. All you're doing is replacing if() and else if() with a switch() statement.
And how in the hell is it 99.99%? Most of the time, my coding is among the most efficient. It's just that others tell me it'd be better if I did it a slightly different way. Like instead of putting item stacking within a Get() or Drop() verb, you'd use Entered() and Exited(). It might be slightly more efficient, but its overall functionality is the exact same thing. And people who criticize others on such minor things need to grow up or find somewhere else to nitpick. Like I said, I welcome subtle improvements like the post by Andre. Something constructive, not just saying "Don't bother since you don't know how", when clearly, I know how, just not necessarily the best way. "It's the thought that counts"? |
Well i'm saying i've seen you on other posts, and other problems that have been bad, and just happened to respond here, as you can tell Pop's snippet was better. And I would love to see where you have bested people like Fizz, or Kaio, or Jeff on these forums. I'm not critizing you on minor things, i'm saying its better for other people if you stop giving advice that COULD be wrong, when easily a better person could respond the right answer, so i'm saying wait until your better then you can respond. Its not like i'm saying you suck or anything, cause I don't respond to messages anymore. It's just you should seriously just read the messages and let them go instead of responding with snippets(So you can still learn from what they do and how the better programmers respond). And this is my last message here and yours too, if you want to talk to me message me on BYOND cause we're spamming this guys thread now.
|
However, it'd still do the math and give that value to the rank variable unnecessarily. Since it only has to change when the kills var reaches a certain value, and not everytime he kills a mob.
|
And seperating the math for ranks and the code for attacking is the entire reason it's written like that, meaning that if you only allow the proc to update their rank when they should get an update, then you might as well move the whole thing into the Death() proc, as simply caluclating if they should update will be the same math as actually updating the rank. There's no need to be redundant.
|
Mizukouken Ketsu wrote:
And how in the hell is it 99.99%? Most of the time, my coding is among the most efficient. With a brief looking through your code, no, no it's not. |
This isn't about nitpicking or making you look bad. This is about you hurting others by posting code when you aren't experienced enough to be doing it.
This discussion has been had plenty of times before, so I'm not going to go into it again. Neither you nor Andre-g1 are at at a point where you should be posting code for others to use. Recognize when you aren't good enough at something to be advising someone else on it. This would be like me trying to give drivers advice on what to do on the road, despite me not having a drivers license - It might lead to bad habbits and dangerous situations. Bad programming habbits are very hard to break; its much harder to unlearn something and learn it the right way than to know nothing and just learn it. |
EDIT
If I have NO idea or am unsure about whether the snippet would actually be of help, I don't post it. I wait for someone else to post.