|
You last visited: Today at 11:52
Advertisement
time problem.
Discussion on time problem. within the CO2 Private Server forum part of the Conquer Online 2 category.
05/05/2013, 19:07
|
#1
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
time problem.
first of all i want to say that i know this is not the best way, its for testing.
i created a code which will use this effect on you every 5 sec, and idk whats wrong but it keep using every 60 sec = 1min.
i rly dont understand why? here is the code
Code:
if (DateTime.Now.Second <= 05 && DateTime.Now.Second <= 00)
{
if (client.Entity.Level == 140)
{
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("break_start");
client.SendScreen(str, true);
}
}
any idea why?
|
|
|
05/05/2013, 19:46
|
#2
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
|
Stop asking for help in that manor. It really bugs me. This isn't code "just for testing", this is a feature you've been trying to program for weeks now and you need programming help because you don't know what you're doing. There's a clear difference and if you want programming help, you need to say so; otherwise, you're just going to confuse people. Stop being so defensive, and let people help. There's no lost pride in asking for help, but pretending you're something you're not is just going to cause even more issues for you. The problem is probably in the loop you put it in; and as I said previously, this is a really bad way of doing this when you could just make a new status type in the client. This is just going to add another layer of stress on your server.
|
|
|
05/05/2013, 20:10
|
#3
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
what are you talking about i already made that
and if i made a thread of cores i am asking for help.
i only made it coz idk why it was looping and since i didn't know why it interested me to ask.
|
|
|
05/05/2013, 21:37
|
#4
|
elite*gold: 0
Join Date: Aug 2007
Posts: 1,525
Received Thanks: 230
|
dude u have been asking Really Stupid Question, all u want to is to be spoon feeded which i wont Provide .. Help Urself
|
|
|
05/05/2013, 21:58
|
#5
|
elite*gold: 0
Join Date: Mar 2013
Posts: 118
Received Thanks: 95
|
Quote:
Originally Posted by LordGragen.
what are you talking about i already made that
and if i made a thread of cores i am asking for help.
i only made it coz idk why it was looping and since i didn't know why it interested me to ask.
|
Wow, sick code bro!
|
|
|
05/05/2013, 22:24
|
#6
|
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
|
if you're casting Level, which is of an integer type, to an integer type, to compare with another integer which is a constant, you're doing it wrong, or you're Korv' from like 6 years ago (BA DA DUM! -- hoping Korv' sees this and gets a small laugh out of walking down memory lane, haha)
|
|
|
05/05/2013, 22:49
|
#7
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
did korv did the same mistake? XD
|
|
|
05/06/2013, 07:17
|
#8
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
|
Well, let's step through your code, shall we? (Or of the code you posted - nobody spoon feed him on this one). So what do you think is wrong with the segment of code you posted? After reading it, do you believe the problem is with this code, or do you believe it's correct?
|
|
|
05/06/2013, 13:51
|
#9
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
well i think it should be correct because thats how you guys told me to make it.
i made a new flag, i added the effect on client. and thats it
|
|
|
05/06/2013, 18:36
|
#10
|
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
|
Quote:
Originally Posted by LordGragen.
well i think it should be correct because thats how you guys told me to make it.
i made a new flag, i added the effect on client. and thats it
|
After reading it yourself though, do you understand it and do you feel that it should be correct?
|
|
|
05/06/2013, 18:59
|
#11
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Why not just do this?
Code:
void UseEffect()
{
while (true)
{
if (client.Entity.Level == 140)
{
_String str = new _String(true);
str.UID = client.Entity.UID;
str.TextsCount = 1;
str.Type = _String.Effect;
str.Texts.Add("break_start");
client.SendScreen(str, true);
}
System.Threading.Thread.Sleep(5000);
}
}
|
|
|
05/06/2013, 19:11
|
#12
|
elite*gold: 0
Join Date: Dec 2012
Posts: 606
Received Thanks: 68
|
@fang i feel like its correct.
@Super Aids
well lets say 200 people are online and 140, wont that hurt the server using the edit on 200 people evey 5 sec?
|
|
|
05/06/2013, 19:29
|
#13
|
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
|
Find out for yourself, would only take a line of two of code to run that 10 times, take an average & * by 200.
|
|
|
05/06/2013, 20:17
|
#14
|
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
|
Rather than running that for every player then run a loop that sleeps every 5 sec that does it. Or make some proper system implementation for such thing instead of using Trinitys source.
|
|
|
05/06/2013, 20:38
|
#15
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
|
Quote:
Originally Posted by Super Aids
Rather than running that for every player then run a loop that sleeps every 5 sec that does it. Or make some proper system implementation for such thing instead of using Trinitys source.
|
Keep in mind that this method would have to be run as its own thread because if you use .Sleep(x) from say a command or item, you just freeze the entire server for that amount of time causing mass lag.
|
|
|
 |
|
Similar Threads
|
Run Time Error! [Problem]
04/12/2012 - Flyff Private Server - 0 Replies
Hallo liebe Community.
Ich hab derzeit mit einem relativ großen Problem zu kämpfen.
Ich starte meinen Flyff Server wie gewohnt doch bei dem World Server kommt ein Error.
Er spuckt mir einen Run Time Error aus und meint es muss terminiert werden oder so. Screen von dem Error oder what immer das is post ich morgen.
Wenn jemand irgendwas darüber weis oder so bitte ich euch es mit mir zu teilen :)
Bitte um sehr schnelle hilfe!!! :o
Ps: Die Source hat keinerlei errors oder so
Die davorigen...
|
Another problem (CE this time)
10/19/2009 - Dekaron - 2 Replies
Hey guys,
I've trouble with getting cheat engine to work with dekaron, when I start up dekaron I use the bypasser (nebular) and then start up CE. Then I go to process list and click on the dekaron.exe thingy but then I get the following error (see screenshot).
Am I doing something wrong? Like opening the wrong .exe or maybe I need something else before I can get it to work?
Imageshack - errordek
Thanks in advance!
http://img26.imageshack.us/i/errorde.jpg/
|
sibi bot problem, dc all the time
08/01/2009 - SRO Private Server - 0 Replies
it worked for the past day or two, then today when i log in, it bots for about 10 mins then i get DC, any1 know why? or any solutions?
thanks
|
crevice-time problem
10/17/2008 - Dekaron - 8 Replies
Hello guys..i've made a crevice hack what works... my only problem is, that i can't kill fast enough in round 9:rtfm: knows anybody of you where i can increase the time??
greetz
thanks for the replies... only needed other skills, items, tactic and exercise
|
Problem With SRO [FIRST TIME]
03/22/2008 - Silkroad Online - 2 Replies
hi all, this problem not for me but for my friend. He's not n00b play sro long time but this problem first time for him. :eek:
so this is him post from other forum with problem.
:confused:
|
All times are GMT +1. The time now is 11:53.
|
|