This site requires JavaScript, please enable it in your browser!
Greenfoot back
NIRO17
NIRO17 wrote ...

2016/9/12

read variable from a text file

NIRO17 NIRO17

2016/9/12

#
x=5 y=6 is in a text file call "location.txt". what I want to know is, how can I read this two x,y values in that txt file in green foot.. i want to make senario base on that x,y variables.Further, there is an actor class called man1 in myworld class.so what i want is set that man1 x,y location to that x,y location in that text file.how can i do this?
danpost danpost

2016/9/12

#
NIRO17 wrote...
x=5 y=6 is in a text file call "location.txt". what I want to know is, how can I read this two x,y values in that txt file in green foot.. i want to make senario base on that x,y variables.Further, there is an actor class called man1 in myworld class.so what i want is set that man1 x,y location to that x,y location in that text file.how can i do this?
What have you tried? Attempt something. Keep in mind, however, that the scenario will not be able to write to a txt file when uploaded (security issues).
You need to login to post a reply.