[Tutorial] Creating cleaner and more read-able code
#13

You know shorter code is not always more readable.. Dont worry about performance until it becomes an issue.
Also the return statements in commands have a function, they let samp know if the command exists or not. You can't guarantee sa-mp Will always return 1 from sendclientmessage. Just use return 1; . That's more readable. Don't put multiple statements on one line. Don't make very long functie calls/if's - split the arguments/expressions onto multiple lines. Indentation is important but it's not 4 spaces perse, advanced editors can set how many spaces a tab is. Use variables instead of defines where possible to avoid nasty surprises.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)