The Daily Click ::. Forums ::. Klik Coding Help ::. Random Text Engine with INI
 

Post Reply  Post Oekaki 
 

Posted By Message

Weston L



Registered
  16/12/2002
Points
  1603
20th July, 2003 at 16:27:55 -

Im trying to make an engine for a game where People walk into a room and they all need to have different names. Each time someone walks into a room or you click on them, their name is displayed on an Edit Object. When they enter the room it generates a random 9 counter. Name1=Bill Name2=Jim Name3=Mark, etc.

It auto-saves the names of people in the room through an INI object.

Now, so all their names are different, there needs to be some way of testing to see if that person's name is already saved in the INI file, if the name is already in the INI file it generates a random number again. That is my question, how can I do that?

 
n/a

Weston L



Registered
  16/12/2002
Points
  1603
23rd July, 2003 at 17:01:44 -

Sorry that was a bit confusing...

Simplified:

Basically, I am wondering if you can test for an item inside of an INI file instead of just strings and values?

 
n/a

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
23rd July, 2003 at 20:13:17 -

Probably the quickest way would be to load the INI into a List Object then do a search on that for the name... though I dont like to create unnescessary objects, but that's just me. The way I would do it would be to create a counter (MIN=0, MAX=1, INIT=0) and search through each item using a Fast Loop and if the name exists setting the counter to 1. If at the end the counter is 1, then select a different number and search again.

I hope I understood your question correctly.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Weston L



Registered
  16/12/2002
Points
  1603
24th July, 2003 at 22:47:23 -

Ah yes, perfect ShadowCaster. Thanks man...

 
n/a
   

Post Reply



 



Advertisement

Worth A Click