Programming/Scripting

 :: Off topic

View previous topic View next topic Go down

Programming/Scripting

Post  Alarba on Tue Oct 18, 2011 11:25 pm

Since there are alot of u who know this crap, and im starting to learn, i decide to create this topic.

1st Question (C++) : How do i create a time event? For example i want to display a message and then after 5 seconds display another message? (Found out Sleep(); and then found out i was missing #include <windows.h>)
avatar
Alarba
EAF Warlord
EAF Warlord

Awards : Fists of Fury Award 2011
Number of posts : 308
Age : 22
Location : Lisbon/Almada/Évora
Job/hobbies : Mastering the guitar, and physics.
Name In-Game : [EAF]Alarba
Registration date : 2010-07-28

View user profile

Back to top Go down

Re: Programming/Scripting

Post  Tony on Wed Oct 19, 2011 12:54 pm

don't use sleep(), use delay()...

in sleep(), compiler loses the last known values... Like value of 'i' in for loop.

delay() and sleep(), both can be found in time.h anywayz
avatar
Tony
Saracen
Saracen

Awards : Trainer Award 2012
Number of posts : 562
Age : 27
Location : India
Job/hobbies : Nothing
Name In-Game : [EAF]Tony
Registration date : 2009-08-08

View user profile

Back to top Go down

Re: Programming/Scripting

Post  Alarba on Wed Oct 19, 2011 2:56 pm

Sleep() isnt losing my values U MAD?! Oh u mean for loopz

Also i need a number generator and rand is messing me up :L Got it.

Y I DECIDED TO PROGRAM FROM NIGHT TO DAY WITHOUT ANY KNOWLADGE FUUUUUUUUU
avatar
Alarba
EAF Warlord
EAF Warlord

Awards : Fists of Fury Award 2011
Number of posts : 308
Age : 22
Location : Lisbon/Almada/Évora
Job/hobbies : Mastering the guitar, and physics.
Name In-Game : [EAF]Alarba
Registration date : 2010-07-28

View user profile

Back to top Go down

Re: Programming/Scripting

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 :: Off topic

 
Permissions in this forum:
You cannot reply to topics in this forum