earthlingj 13 Posted June 24, 2012 Report Share Posted June 24, 2012 Hey, I completely understand hwo to thread and stuff, but the issue im having is with variables..in some cases... i would like to 'pass' a variable from 1 command to another. is that possible? for now since i couldnt figure it out i combined all my commands into 1 command... now the problem is... my variables aren't changing.. so lets say i have a variable #newusername which = account random lastname + random numbers. but when running each thread is trying to register the exact same account. I have set the variables to local as well. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 24, 2012 Report Share Posted June 24, 2012 how is the variable being set? with list data? account data? if account data do you have reset account data before your variables that use it? Quote Link to post Share on other sites
earthlingj 13 Posted June 24, 2012 Author Report Share Posted June 24, 2012 i am setting data using account data(lastname)+random numbers(100-99999) Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 24, 2012 Report Share Posted June 24, 2012 so do you have a reset account data at the top of that defined command? if not place one there and will solve your problem. Quote Link to post Share on other sites
earthlingj 13 Posted June 24, 2012 Author Report Share Posted June 24, 2012 Yes, I have reset account already there Quote Link to post Share on other sites
earthlingj 13 Posted June 24, 2012 Author Report Share Posted June 24, 2012 I think the problem is the variable is being over-written by other threads even though i have it set to local Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 25, 2012 Report Share Posted June 25, 2012 can you show me how you have your threading setup, and the code, otherwise i cant really debug the problem. I can give you suggestions but they are blind unless i actually know how you have it setup i cant fix it. Quote Link to post Share on other sites
earthlingj 13 Posted June 25, 2012 Author Report Share Posted June 25, 2012 I actually figured it out, but i want it to be more organized. is it possible to pass variable data from 1 command to another? i seem to not be able to do it Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 25, 2012 Report Share Posted June 25, 2012 yes by using parameters.. you have to set the parameter to be pasted to the next command, and or just call the local variable from the 1 command that is being used in the next command within that thread. Quote Link to post Share on other sites
earthlingj 13 Posted June 26, 2012 Author Report Share Posted June 26, 2012 hmm are there any example codes around? Quote Link to post Share on other sites
earthlingj 13 Posted June 27, 2012 Author Report Share Posted June 27, 2012 anything on this? I could really use it. my bot is all multi threaded up and works, but only will complete 1 account, because on all the other threads its using the same variable as teh first thread.. and when i localize it doesnt work because it doesnt get passed from 1 command to another even in the same thread Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted June 27, 2012 Report Share Posted June 27, 2012 Feel free to private message me with the code to take a look at what your problem is, ill adjust it and send it back to you. its normally something small, but can be over looked very easily Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.