Im writing monopoly, Im still a beginner so please help.... I wrote this for loop but for some reason it starts at 28 and not at 1....

For r := 1 to 28 do
If STekoop[1,r] = plek then
If messagedlg(STeKoop[r,2] + ' FOR SALE.' + #13 + 'Price: ' + STekoop[r,3] + #13 + 'Buy?',mtConfirmation,[mbYes,mbNo],0) = mrYes then
Begin
Money1 := Money1 - StrToInt(STekoop[r,3]);

Please help

There is not enough code shown to answer. How are you determining that r begins at 28? Can you show us the code for STekoop[1,r]?

I used F7 to check.... But got it fixed now.... Had to have 2 for loops for a 2D array....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.