Lets say I had two commands:
and each of these did something very similar, such asCode:if (!strcmpi("command 1", command))
if (!strcmpi("command 2", command))
Is there a way I can instead check to see what number was entered, perhaps:Code:executecommand(1);
//or
executecommand(2);
and then, somehow, convert that 3 from a char to an integer and then doCode:if ('3'==command[9])
Code:executecommand(integer);