Is there a faster way to do this?
I'm was thinking the other day about changing speeds based on levels, and I came up with this.
Code:
I was just wondering if there is a faster way then making a mess of ifs and else ifs. |
Code:
|
ooh i like that idea! Is that your whole code?
|
Depending on the max levels, that could take forever, and it would use up a huge amount of space in the plugin. Just use a simple formula for it.
Code:
|
/me slaps forehead
so simple! Yet I couldn't figure it out. Wow, you totally opened up a new line of thinking for me. Thanks again. |
Quote:
|
Quote:
I see a lot of this. Common mistake. You forgot your breaks. Case execution falls through. it should look like this: Code:
XxAvalanchexX had the right idea though. That's your best bet. |
Small doesn't require breaks :wink:
|
Oh. :oops:
Thanks for letting me know. |
SMALL breaks when it reaches a case that matches. No fall through.
|
| All times are GMT -4. The time now is 09:55. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.