Posts: 5,320
Threads: 300
Joined: Feb 2011
Reputation:
149
03-28-2012, 07:36
(This post was last modified: 03-28-2012, 07:37 by JariZ.)
I hope the !s bug is fixed, also I really don't like the !s part at all.
Will probably release a modded version of the one I made for RtD because that one does work fine, and doesn't lag so much
Posts: 1,323
Threads: 24
Joined: Nov 2010
Reputation:
91
@JayDi if you wanna print messages to all players you can use null as the ServerClient parameter you don't need to use foreach.
Posts: 502
Threads: 13
Joined: Feb 2012
Reputation:
42
03-28-2012, 08:51
(This post was last modified: 03-28-2012, 08:52 by JoSchaap.)
CSHARP Code
private void printAll(string msg)
{
foreach (ServerClient client in base.GetClients())
{
base.iPrintLn(msg, client);
}
}
private void printAllBold(string msg)
{
foreach (ServerClient client in base.GetClients())
{
base.iPrintLnBold(msg, client);
}
}
change to:
CSHARP Code
private void printAll(string msg)
{
base.iPrintLn(msg, null);
}
private void printAllBold(string msg)
{
base.iPrintLnBold(msg, null);
}
will solve some of your lag issues indeed
Had a life, Got a modem..
Posts: 1,323
Threads: 24
Joined: Nov 2010
Reputation:
91
A lag often means that an exception occured. I recommend you to use try catch blocks. Also if you use many if statements to check one single variable (like you do with the random perks) it's better to use switch case.
Posts: 502
Threads: 13
Joined: Feb 2012
Reputation:
42
:YUNO: add source? saves me from decompiling
Had a life, Got a modem..
Posts: 2,992
Threads: 55
Joined: Feb 2011
Reputation:
114
because there are bugs he'll fix tomorrow
Posts: 502
Threads: 13
Joined: Feb 2012
Reputation:
42
i wont stop decompiling, that just curiousity
however i would never and will never post the full source without authors agreement
this was just a snippet, to elaborate the lag issue
Had a life, Got a modem..