Page 1 of 1

Code Structure(For Beginners)

PostPosted: 02 Oct 2013, 20:39
by Breakdown901
Hey, I'm just going to post some useful stuff for you beginner coders.

A large part of coding is structure, the more legible the code, the better it is. Sometimes its better to structure it in a way so everything isnt crowded. Heres an example:

Code: Select all
string oprank = Group.findPerm(LevelPermission.Admin).name;
Command.all.Find("setrank").Use(p, who.name + " " + oprank);


What that code does is find the name of your Operator rank, then ranks "who" (player your ranking), to the operator rank. You could make an /op command with that code right there. Also, it seems much more structured.

Thats all, I'll probably make an updated one of this when I get round to it.

Thanks!