Hi,
i have the problem that i want to create a map from a file.
I got no problems with saving the file,
but i dont know who to continue.
I want to read the file(its just 1 and 0)and if it is "1",
he should do something.
With the System.out.println() i get the right number(the number that i saved in the file)
but he dont creates the object.
How can I do an If(fileText=="1")??
P.S.
Sorry for bad English
String z="";
try
{
BufferedReader comp = new BufferedReader(new FileReader("SaveEdit1.txt"));
z=comp.readLine();
System.out.println(z);
if(z=="1")
{
Block block = new
Block(0,0,false);
addObject(block, 22+x*35,
20+y*20);
Edit1Levblo++;
}
}
catch(IOException e)
{
System.out.println("Something went
wrong");
}