/fuck if someone in Range
#2

Your code is really messy because of the way you do:

pawn Код:
if(this)
{
    if(that)
    {
        // Code
    }
    else
    {
        // Error
    }
}
else
{
    // Error
}
it's sooooooooooo much easier to read if you just use one return line:


pawn Код:
if(!this) return error;
if(!that) return error;
// Code
Reduced from 15 lines to 3.

Why are you using strtok? 'params' will contain the ENTIRE player ID/name string, there is no need to use strtok at all.
Reply


Messages In This Thread
/fuck if someone in Range - by ThamburaaN - 22.04.2012, 02:19
Re: /fuck if someone in Range - by MP2 - 22.04.2012, 02:22
Re: /fuck if someone in Range - by ThamburaaN - 22.04.2012, 02:27
Re: /fuck if someone in Range - by MP2 - 22.04.2012, 02:32
Re: /fuck if someone in Range - by ThamburaaN - 22.04.2012, 02:36
Re: /fuck if someone in Range - by MP2 - 22.04.2012, 02:38
Re: /fuck if someone in Range - by ThamburaaN - 22.04.2012, 02:45
Re: /fuck if someone in Range - by MP2 - 22.04.2012, 02:57
Re: /fuck if someone in Range - by ThamburaaN - 22.04.2012, 03:01
Re: /fuck if someone in Range - by Sasino97 - 22.04.2012, 07:14

Forum Jump:


Users browsing this thread: 2 Guest(s)