Its ok! I worked it out - sorry to waste anyones time. I used the do statement (I am sure I have managed to do it another way in the past) do "pRow" & vIndex & "_Correct_Vehicle" & "=" & vVehicle Cheers Paul -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paul Steven Sent: Wednesday, October 04, 2000 12:05 AM To: Lingo-L Subject: <lingo-l> Creating a variable name - troubles! Hi there Facing another deadline and can't seem to do something I am sure I have done many times before. I want to create a variable name on the fly i.e I have the folowing properties property pRow1_Correct_Vehicle property pRow2_Correct_Vehicle property pRow3_Correct_Vehicle property pRow4_Correct_Vehicle Now I want to assign them values by using a repeat loop i.e repeat with vIndex=1 to 4 -- Randomly Choose A Vehicle From The Remaining Vehicles vNumber_Of_Vehicles_Left=count(pList_Of_Vehicles) vRandom_Index=random(vNumber_Of_Vehicles_Left) vVehicle=getAt (pList_Of_Vehicles, vRandom_Index) ("pRow" & vIndex & "Correct_Vehicle")=vVehicle -- Remove used vehicle from list of available vehicles deleteAt pList_Of_Vehicles, vRandom_Index end repeat The line in question is the ("pRow" & vIndex & "_Correct_Vehicle")=vVehicle I am getting a script error saying "Expected =" What am I doing wrong? Thanks Paul [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!] [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]) Lingo-L is for learning and helping with programming Lingo. Thanks!]
