The Daily Click ::. Forums ::. Klik Coding Help ::. Is there an easier way to do this?
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
21st February, 2008 at 21:31:38 -

http://i262.photobucket.com/albums/ii89/smuz86/tgproblem.gif
http://i262.photobucket.com/albums/ii89/smuz86/tgproblem2.gif

If you look at the screenshot 1, you'll see that I'm trying to copy a bunch of variable names to do the same thing as the variables before them. But since there's a different name, I have to recopy the same thing 3 times.

Screen 2 has the same problem, but in a different way. Seems kinda like a waste of time copying and pasting over a hundred variables over a few hours.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Zi-Xiao



Registered
  29/07/2002
Points
  537

VIP Member
25th February, 2008 at 11:27:15 -

The only workaround I can see to this is something like this:

Instead of using "winseller" "bucklemaker" etc. You'd have to use variables. One way to do this is to store all your variable names in a string object and set the variable names in your number generation code to retrieve a alterable string number.

Example:
Alterable String
0 - wineseller
1 - bucklemaker
2 - furrier
3 - glovemerchant

On loop "generate"
RandomInt("random object",1,100) <= GroupItemValue("INI","",retrieve alterable text (get loop index of generate))
Set value GroupItemValue("INI","generated",retrieve alterable text (get loop index of generate)) + 1 to item retrieve alterable text (get loop index of generate)) in group "generated"

Alot of text but hopefully I understood your problem and you understand what I'm trying to say.

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
27th February, 2008 at 22:49:57 -

Hey, that's not a bad idea. I avoided values because I'd usually forget what they mean, but the string thing solves just about everything. Somehow I get the feeling something will mess up if I try that, but we'll see

Thanks!

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image
   

Post Reply



 



Advertisement

Worth A Click