Code Structure(For Beginners)

Code Structure(For Beginners)

Postby Breakdown901 » 02 Oct 2013, 20:39

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!
Owner of:
Breakdown901 Lava Survival/Zombie Survival/Freebuild
Host of NeonGaming Lava Survival.
Breakdown901
 
Posts: 320
Joined: 24 May 2013, 12:54

Return to Knowledge Base

Who is online

Users browsing this forum: No registered users and 1 guest

cron