I have this code where I cannot move onto the next line I keep feeding my variables the same stuff every time for example
Two-Story 5 43 2012 3670 389000 8960
Two-Story 5 43 2012 3670 389000 8960
Two-Story 5 43 2012 3670 389000 8960
When I should be getting something like this
Two-Story 5 4 3 2012 3670 389000.00 8960
Single-Story 3 2 2 2003 1450 135000 2250
Split-Condo 3 2 2 1999 1630 165300 2670
I have this function called print and it just prints simply
as so
Every time you go to read data into your properties variable, you're opening the file. This means you open the file, you take in the first line, the function finishes (meaning the variable that opened the file is destroyed), and then repeat.
You need to either have a variable to keep track of which line your on and skip to that line every time you enter the function...
or you can open the file outside the function, so that you're not constantly reopening the file every time you want to take in a line. Every time the file opens, you're starting at the beginning of the file!