Server Help

Non-Subspace Related Coding - The Admin Cpanel - My version

Quan Chi2 - Fri Aug 11, 2006 4:47 pm
Post subject: The Admin Cpanel - My version
Name: Admin Control Panel
OS: Win XP
Language: C++

What it is:

Its a remake of Assassin's Admin CPanel program(for the most part). It has most of the same functions. Some functions I thought were pretty useless so I didn't out them in my version. This version was coded in C++. Its console based. This is for people who like to type commands. I used basic batch commands for the most part. Nothing major.

Image of it

**Thats an older image. I added a few more commands an hour ago.
Mine GO BOOM - Fri Aug 11, 2006 6:15 pm
Post subject:
  1. Use Release build not Debug build when compiling your program for distribution. People don't need a half meg executable when a 32k version will run ten times faster.
  2. Learn an indent style and stick to it. Almost any programming text editing program will help you along with tabs and such. Mine is close to BSD/Allman style, except I like spaces after if/while/for/etc before the parentheses.
  3. Readmes should have either no extension or txt for an extension. Don't go making up a .readme extension.
  4. For your main loop, a do-while loop would be better than a while loop. Sure, it doesn't make too much of a difference, but you should get in the happen of when to use a while loop and when a do-while is the correct one.

Quan Chi2 - Fri Aug 11, 2006 6:27 pm
Post subject:
I didn't use MSVC++.

I like to keep no space after if/while/for statements before parenthesis.

I just saved the notepad file named readme, and added no .readme extension.

What do you mean by the last part of the fourth comment?

**oh and thanks for the info on indent style. I never heard of it before. biggrin.gif
BDwinsAlt - Fri Aug 11, 2006 6:55 pm
Post subject:
I'm glad you found the CD Tray open/close code. I had a hard time with that one personally. I agree with what Mav said. I hope you will exspand your knowledge of C++ and program for Good. That's for releasing the source. All in all good job.
Quan Chi2 - Fri Aug 11, 2006 7:01 pm
Post subject:
biggrin.gif awesome. I think thats a first.
BDwinsAlt - Fri Aug 11, 2006 7:09 pm
Post subject:
Oh I had to add winmm.lib to my commandline to get it to compile the mciSendString to open the cd tray. Just a heads up for anyone who might be working with CD Trays...
Quan Chi2 - Fri Aug 11, 2006 7:18 pm
Post subject:
Yeah, maybe I should have mentioned that with the source? Should I put a copy of that file in with the source?
Assassin2684 - Fri Aug 11, 2006 9:18 pm
Post subject:
Pretty good. I like how you did yours. i might redo mine in C++ but with a better interface.
(Deactived B l a h e r) - Fri Aug 11, 2006 9:36 pm
Post subject:
Assassin2684 wrote:
Pretty good. I like how you did yours. i might redo mine in C++ but with a better interface.


If it's a GUI, good luck. Other wise, I don't see the point.
Quan Chi2 - Fri Aug 11, 2006 10:17 pm
Post subject:
I could have done a GUI just as easy as I did this, but I wanted to make it look different and feel different.
Assassin2684 - Fri Aug 11, 2006 10:42 pm
Post subject:
Ya... I want to make a GUI. Not exactly sure how. Guess I will add it onto my list of things to do. But I could make one like yours Quan.
Quan Chi2 - Fri Aug 11, 2006 10:44 pm
Post subject:
Um. I have a few ebooks that explain how to make GUIs using MSVC++. I also have some tutorials/ebooks on how to use API functions.
BDwinsAlt - Sat Aug 12, 2006 12:49 am
Post subject:
Quan Chi2 wrote:
Yeah, maybe I should have mentioned that with the source? Should I put a copy of that file in with the source?


I would think most compilers (any good one) would have it. But you could include it if you wanted to.
Dr Brain - Sat Aug 12, 2006 1:20 am
Post subject:
Mine GO BOOM wrote:
  1. For your main loop, a do-while loop would be better than a while loop. Sure, it doesn't make too much of a difference, but you should get in the happen of when to use a while loop and when a do-while is the correct one.


Ignore this tip. Always use a while.
Cyan~Fire - Sat Aug 12, 2006 10:09 am
Post subject:
There are some situations when a do-while is preferable.

Code: Show/Hide
      n_parse = strtok(s_parse, ",");
      do
      {
         i = atoi(n_parse);
         if (*c_parse = (UnitLink*)getById(esdata.units, i))
            c_parse++;
         else
            printf("Discarding non-existant unit type %d.\n", i);
      } while (n_parse = strtok(NULL, ","));

Quan Chi2 - Sat Aug 12, 2006 1:25 pm
Post subject:
That makes sense.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group