[Tutorial] How to make your server/script look clean and good.
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Not exactly sure why you'd need 3 separate functions to simply return messages. Wouldn't it be simpler if you just did something like;

pawn Код:
#define ERROR_GENERAL 1
#define ERROR_USAGE 2
#define ERROR_PERMISSION 3

public exception(playerid, type, msg[])
{
    switch(type)
    {
        case ERROR_GENERAL: {}
        case ERROR_USAGE: {}
        case ERROR_PERMISSION: {}
    }
    return 1;
}
I do agree with the section about the pastel colors and the grammar, though.
The Nal message doesn't need to be written in the script.
Its just return nal(playerid);

the usage goes like usage(playerid, "/pm [Player ID] [Message] ");


That's the only difference, apart from the text between the starting [ and ] Tags.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)