Do you think I could just leave this part blank and it'd be okay? We're just going to replace the whole thing with a header image anyway, right?
You are not logged in.
Pages: 1
Topic closed
OK I want to have at least 10 seconds between two different blocks being placed in the same place.
I already tried:
con.Send(bldatam, 0, x, y, blockid, TimeSpan.FromSeconds(10));
OR
con.Send(bldatam, 0, x, y, blockid);
Thread.Sleep(200);
Sorry, I'm a beginning in Programming s I don't really know anything.
If you know reply please.
SHUT AND LISTEN!!!
Offline
Thread.Sleep is in ms, meaning a value of 1000 = 1 second.
So if you'd want 10 seconds, you'd need a value of 10 * 1000 = 10000.
Long story short, use this:
con.Send(bldatam, 0, x, y, blockid);
Thread.Sleep(10000);
Offline
Thanks for the help!!!
I'm dumb
SHUT AND LISTEN!!!
Offline
Real_Naa2001 wrote:Thanks for the help!!!
I'm dumb
You're not dumb for dont know something ^^
Just ignorant
thanks zoey aaaaaaaaaaaand thanks latif for the avatar
Offline
AmdS wrote:Real_Naa2001 wrote:Thanks for the help!!!
I'm dumb
You're not dumb for dont know something ^^
Just ignorant
You didn't know this at one point, get off your high-horse.
He was almost correct, he had
TimeSpan.FromSeconds(10)
and
Thread.Sleep(200);
therefore very close to
Thread.Sleep(TimeSpan.FromSeconds(10));
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
I must say using Thread.Sleep isn't a smart way to do it though (unless you run it in a separate thread).
Try and use Timers as much as you can.
Offline
I must say using Thread.Sleep isn't a smart way to do it though (unless you run it in a separate thread).
Try and use Timers as much as you can.
Let's not throw the book at a newbie.
One bot to rule them all, one bot to find them. One bot to bring them all... and with this cliché blind them.
Offline
den3107 wrote:I must say using Thread.Sleep isn't a smart way to do it though (unless you run it in a separate thread).
Try and use Timers as much as you can.Let's not throw the book at a newbie.
Exactly, stick to Thread.Sleep then timers later on when an understanding of the language has actually improved!
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
Koya wrote:therefore very close to
heh, yes. Put the 200 in teh FromSeconds, then wonder why teh entire bot breaks. lel
Really? That's not what I said, he had the correct timing for 10 seconds and he has the means to implement the delay/sleep - he just didn't put it together because he is new.
It broke because he put a timing into the block send not because it was waiting 200 seconds.
Thank you eleizibeth ^
I stack my signatures rather than delete them so I don't lose them
Offline
den3107 wrote:I must say using Thread.Sleep isn't a smart way to do it though (unless you run it in a separate thread).
Try and use Timers as much as you can.Let's not throw the book at a newbie.
Which is why my original solution didn't contain it yet
Offline
hummerz5 wrote:Koya wrote:therefore very close to
heh, yes. Put the 200 in teh FromSeconds, then wonder why teh entire bot breaks. lel
Really? That's not what I said, he had the correct timing for 10 seconds and he has the means to implement the delay/sleep - he just didn't put it together because he is new.
It broke because he put a timing into the block send not because it was waiting 200 seconds.
sorry. I didn't mean to say that wasn't what you said.
HOWEVER
your claim that "oh, he was close" struck me as funny, because random combinations of the two lines could have lead to an inexplicably long wait.
Offline
Problem solved, topic closed.
I have never thought of programming for reputation and honor. What I have in my heart must come out. That is the reason why I code.
Offline
Pages: 1
Topic closed
[ Started around 1732448386.8971 - Generated in 0.056 seconds, 14 queries executed - Memory usage: 1.65 MiB (Peak: 1.85 MiB) ]