Guide to building the Shoddy Battle 1 server from source

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
A guide to building the Shoddy Battle server from source is now available here:

Guide to building a Shoddy Battle server

If you are looking to run a server with maximum flexibility and the latest updates, building from source is your best option. The guide also touches on port forwarding for people who are having trouble having others join their server.

If anything is still unclear or you have further questions about building from the sources, you can ask in this thread.
 
C:Program FilesJavajdk1.x.x_xxbinjava.exe. Once you have found this file, drag it to your command line and then enter the rest of the command.
I have jdk1.6.0_14

Is that just this file?:



Or is it another file?
 

Cathy

Banned deucer.
The 'x' means it could be any number; it's called a variable. So yes you are staring at the right file.
 
Alright, but here's what happens when I use that file:


(In order to keep my user and pass a secret, I used Smogon as user and Error as password. I will not that this is what happened exactly when I used the acc/pass I actually wanted to use.)
 

Cathy

Banned deucer.
You need to change into the directory where you have your Shoddy Battle checkout, as the guide says. Please read the guide before asking questions.
 
You need to change into the directory where you have your Shoddy Battle checkout, as the guide says. Please read the guide before asking questions.
(Why does it say "Fat" ColinJF? I can't delete it)


WTF? I swear I changed it to that. And no joke, I've read the guide like 20 times! But I'll check to see if that was the problem.

I see you guys have no patience for stupidity.

EDIT: This is what I got after re-routing it:
C:\Documents and Settings\Jared\My Documents\NetBeansProjects\ShoddyBattle>"C:\Program Files\Java\jdk1.6.0_14\bin\java.exe" java -cp dist/ShoddyBattle.jar shoddybattle.AccountEditor Admin smogon 2
Exception in thread "main" java.lang.NoClassDefFoundError: java
Caused by: java.lang.ClassNotFoundException: java
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: java. Program will exit.
 

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
The path to the java program replaces the word java in the command.

What you want is
Code:
[SIZE=2]"C:\Program Files\Java\jdk1.6.0_14\bin\java.exe" -cp dist/ShoddyBattle.jar shoddybattle.AccountEditor Admin smogon 2[/SIZE]
 
Okay, I have a problem. I've managed to forward both TCP and UDP traffic on my port (22222). People can get on my server, but they can only get on when my computer is functional. Why?
 

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
You need to have your computer on and awake for people to connect. It's pretty hard for people to connect to your server on your computer if your computer is turned off. The server is running on your computer, not by some magical means
 

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
You can give them your ShoddyBattle.jar file and they will be able to run your server, but then your metaserver information will change
 
This time, I used that exact code you gave me, and it said "Failed to make new account", or something on those lines.

Needless to say, I'm going to back to a different way.

Thanks for trying to help though.
 

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
If it failed to create an account then it sounds like there is something wrong with your mysql settings in the server.properties file. What happens when you try and run the server?
 
Hi again, how do I set up a UU (and possibly other customizable) ladderS?

Edit: I sent someone my shoddybattle.jar file but it still didnt work.
 

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
Hi again, how do I set up a UU (and possibly other customizable) ladderS?

Edit: I sent someone my shoddybattle.jar file but it still didnt work.
Try sending them your whole Shoddy Battle Server folder instead. They will also need a mysql database set up. Adding other ladders requires a bit more knowledge that I might detail another time

Do you need a computer by itself to run the server? Or can you have the computer for the server and still use it?
The server is just a program running on your computer, you can continue to use it for whatever you want
 
Uhm.. I've a little problem >.<

http://shoddybattle.com/server_guide#mysql

Where do I create the Database ?

Please help me >.<
If you're running the server from your home computer, you need php and mysql installed on it first. I also recommend you downloading and installing phpmyadmin for easy access to your mysql database.

Once you've logged in to your database, simply quiery the code you see on that installation guide, and the tables will be made for you.
 

Cyrrona

starlet
is a Tiering Contributor Alumnus
I seem to be having the same problem as Sir Aaron--I get a nearly identical error message when I try to set up the first account on the server. I've done my best to follow the guide, and up until this point, everything (with one exception) has gone off without a hitch. That exception was during the MySQL installation, and it looked like this:



I'm not sure why it couldn't start the service, since I haven't deviated from the guide at all (to my knowledge, at least). It still let me open the program with the Command Line Client and input the code from the MySQL section, so I don't know if the above screenshot is a problem or not. If it is, I'd love to know how to fix it.

But anyways, during the first account set-up, I get this message:



Reading through some of the posts in this topic, I tried pasting in bearzly's suggestion, but I got a similar error:



If someone could tell me where this is all derailing (and how I could get it back on track), I would really, really appreciate it. (And I sincerely apologize if I'm asking obvious questions and/or making stupid mistakes with any of this--I'm pretty terrible with computers...)
 

Cathy

Banned deucer.
I'm guessing you didn't run the MySQL installer as root. Try right click -> run as admin.
 

bearzly

Shoddy Battle dev
is a Battle Simulator Admin Alumnusis a Programmer Alumnusis a Forum Moderator Alumnus
El Becko, I think your problem is that you don't have a ShoddyBattle.jar created. Go into Netbeans and F11 to build the project (or hit the blue hammer icon). Also, the account editor is pretty shoddy so it won't work with names with a space in it. You can make a dummy account and then create another account the normal way and make it an admin the normal way

I also got the service could not be started thing, but it actually worked fine so I didnt mention it.
 
I have a quick question. For the server welcome page, it looks like it only interprets strings? Is there an easy way to display images/text/html/flash on the welcome besides re-writing alot of the other code?
 
My friend has a question about the server he is creating. He wants to know how to phpmyadmin to create tables for mysql?
If there is a link to follow to download anything post it please and thanks.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top