Proofreading
I was wondering if someone would like to proofread this for me:
http://www.ampaste.net/m29e3dd6f I've already ran through it and compiled, I haven't seen any problems, but I was wondering if someone with a bit more scripting experience would like to try it. Also, would anyone mind doing a quick bug test on their servers, I don't have one and it would be really appreciated. P.S. It's not like I'm lazy or anything, but I use Cstrikes "new game" option and It wont let any one on there besides me. |
Re: Proofreading
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
In addition, you check file_exists() twice. The compiler is stupid and will not optimize this out. Instead of else if, you can simply use else. The reason is that this is boolean logic; if we know that the statement "the file does not exist" is false, then we know that the statement "the file does exist" is true. You also use the string "Warfighter/classinfo.html" three times, so it would be better cached. PHP Code:
PHP Code:
PHP Code:
|
Re: Proofreading
First of thanks alot, It must have tooken quite awhile to do that.
About indenting, when I press Ctrl-I in the compiler, it just brings the code to look like that, and when I indent by myself, it gives me some warnings. Quote:
Quote:
Quote:
Again, Thanks alot :D |
Re: Proofreading
Quote:
Quote:
PHP Code:
Quote:
PHP Code:
|
Re: Proofreading
Also, I just noticed your cs_set_user_bpammo() call. I don't think it will allow you to add more than 1 HE grenade to the person's backpack. You'll have to catch when it's thrown and then give the user another one.
|
Re: Proofreading
Quote:
About avoiding the "new" operator, i don't think you can for arrays. |
| All times are GMT -4. The time now is 17:40. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.