blitzmax and text files
BlitzMax Forums/BlitzMax Programming/blitzmax and text files
| ||
ok im lost with something that should be simple. I have a text file in this format Name 25000 1 the text file is made in blitz3d using writeline but when I try to use this code in bmax ServerConfigFile = OpenStream("Server.con") Server_Name$ = ReadLine(ServerConfigFile) Server_Port = ReadLine(ServerConfigFile) logstatus = ReadLine(ServerConfigFile) CloseStream(ServerConfigFile) it spits out this error [unable to convert string to int] I'm not sure why. |
| ||
change this : Server_Port = ReadLine(ServerConfigFile) by this : Server_Port = Int(ReadLine(ServerConfigFile)) EDIT : And logstatus = ReadLine(ServerConfigFile) by this logstatus = Int(ReadLine(ServerConfigFile)) |
| ||
thank that worked perfect. |
| ||
You're welcome |