Are you compiling when you save the .java file?
|
hello
ill got a problem with the welcome message
when ill log in to my server as mod ill get
[MOD] redbunny had logged in!!!
but when i make my admin/owner or ill go on my name it wont give my the welcome message plz can some one help my new to java so...
ps the text in the middel that should not be in there.
sM("Welcome to roenscape");
sM("plz be-sure that you read you rules by type ::rules");
sM("forums: is updating");
sM(" ::talk (message to everyone)");
sM("[Last Update]: added d claws and spec!");
if (donator == 1){
sM("@@ you are donator type ::yell instead of ::talk!!!");
sM("@@ you can now enter the donator portal");
-------------------------------------------------------------------
===========================================
this side is OK but the other side its fucked up?
===========================================
-------------------------------------------------------------------
===========================================
this side its fucked up?
===========================================
--------------------------------------------------------------------
if (playerRights == 1){
talk("[MOD]: "+playerName+" has logged in!!!");
if (playerRights == 2){
talk("[ADMIN]: "+playerName+" has logged in!!!");
if (playerRights == 3){
talk("[CO-OWNER]: "+playerName+" has logged in!!!");
if (playerName.equalsIgnoreCase("redbunny")) {
sM("Owner & Coder, redbunny has logged in!!");
}
}
}
}
}
yea ill save the file than compile then ill log in and its the same as before only mod work
no,
save, compile, it then relog...
Lol, do this:
Close server (run.bat)
Compile
Run.bat again.
If you don't restart the run.bat the server is still running the old unchanged one.
nope wont work..
Well first off the lines of code for those if statements fail beyond belief.
Code:if (playerRights == 1) { talk("[MOD]: "+playerName+" has logged in!!!"); } else if (playerRights == 2) { talk("[ADMIN]: "+playerName+" has logged in!!!"); } else if (playerRights == 3) { talk("[CO-OWNER]: "+playerName+" has logged in!!!"); } if (playerName.equalsIgnoreCase("redbunny")) { sM("Owner & Coder, redbunny has logged in!!"); }
try somthing like this??
add this somewhere at the top.
then in the log in add this.Code:private static final String[] YELL_STRINGS = {"[Player] ", "[Mod] " , "[Admin] " , "[CO-Owner] " , "[Owner & Coder] "};
Code:if(playerRights > 0) talk(YELL_STRINGS[playerRights] + playerName + " has logged in!!");
and for your "yell" command you could do
Code:if(command.equals("yell")) talk(YELL_STRINGS[playerRights] + playerName + ": " + command.substring(5));
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |