Noob Posted March 25, 2007 Share Posted March 25, 2007 If possible, I'd like two AdlibEnable() inside one function. AdlibEnable("first", 60000) AdlibEnable("second", 500) The first would serve me as a 1 minute timeout for my BlockInput() function - in case my function gets stuck. And the second would check for something else every 500 milliseconds. But I don't think I can use 2 AdlibEnable() in one function, can I? If yes, would one AdlibDisable() disable both of them? (Sorry if this is a really silly noob question.) Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 No, you can't have two Adlib's. The first Adlib here, to check for crash, is used for a proper reason. The other one, that is checking for something, should be in the main loop of your program.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Noob Posted March 25, 2007 Author Share Posted March 25, 2007 Thanks much. This ends my several day long wondering about this Link to comment Share on other sites More sharing options...
jvanegmond Posted March 25, 2007 Share Posted March 25, 2007 Thanks much. This ends my several day long wondering about this Yeah, that can be one of the most terrible things about programming! github.com/jvanegmond Link to comment Share on other sites More sharing options...
crislivinitup Posted March 26, 2007 Share Posted March 26, 2007 (edited) I want to have several adlib functions included in my bot. so far I have one that checks health lvl at intervals of 2500 miliseconds but I want to add another one that checks x and y coords but much later. I have a short solution where my adlib function could contain a counter so that when 10,000 miliseconds is reached it excutes the check and resets the counter variable however is it possible to have two? No, you can't have two Adlib's. The first Adlib here, to check for crash, is used for a proper reason. The other one, that is checking for something, should be in the main loop of your program..From what I read above, you said include the second one in the main loop and to me that doesn't make sense because that means it is run continously. everytime the loop is repeated it will set the adlib function, an adlibenable() should only be used once per function, shouldn't need to be used twice - let alone to be included in the loop. Do you mean to include a call function in the loop? that would make more sense but it still isn't equivalant to an adlibenable(). Therefore I don't understand your reply. Could you or someone else confirm or elaborate on this please. Edited March 26, 2007 by crislivinitup Link to comment Share on other sites More sharing options...
hearurscream Posted March 26, 2007 Share Posted March 26, 2007 Just as Manadar said, you cannot have two adlib functions. A series of checks can be performed with If.. Then statements and the proper action can be taken there. Of course you could also just have two scripts and have one call the other one so you only have to start one. Hope this helps somewhat. Screamz Infinity is a floorless room without walls or ceiling.Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe, and not make messes in the house. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now