Broken!
BlitzMax Forums/BlitzMax Beginners Area/Broken!
| ||
Code ( Stream=ReadFile("test.txt") TextLine$=ReadLine(Stream) CloseFile Stream ) When Try building app I get this error! MaxIDE Unhandled Exception:Attempt to access field or method of null object. I think blitzmax is broken you please tell me a version that is not broken? |
| ||
No problem here as long you supplied the text file, try v1.5 |
| ||
It surely highlights a line containing the error. It also shows a debugging pane (in maxide). "Stream" will be "null" there. the problem is then the try to call "readline()" with a null param. Short: test.txt mighr be missing. So readstream fails and you do not check weather readstream was successful or not Bye Ron |
| ||
The file "test.txt" either does not exist or is not in the current directory. Print CurrentDir() at the start of the code. At least you will know where ReadFile is looking. |
| ||
Since BlitzMax is obviously too complicated for you, I suggest you use something else more suitable, like a good book. |
| ||
Since BlitzMax is obviously too complicated for you, I suggest you use something else more suitable, like a good book. :) 241 posts from this guy requesting help on "BROKEN" features of blitzmax... hahahah |
| ||
you could add a null check to know if the file test.txt can be found at your specified path location. Code ( Stream=ReadFile("test.txt") If Stream = Null Notifty "cannot find file to read" ; End TextLine$=ReadLine(Stream) CloseFile Stream ) |
| ||
think blitzmax is broken you please tell me a version that is not broken? If 1000 of your posts with the same code says that blitzmax is broken, then try blitz3d. |
| ||
Lol, this guy again. With the same damn "sample code" like all the other posts. Reading from files is very very difficult for this one. Sorry but after that many posts asking about the same thing and ignoring all the helpful comments, i think its impossible to help him. |
| ||
It says Notifty not found. I think blitzmax is messed up. |
| ||
I reinstall blitzmax it seems to work now thanks. I KNOW HOW TO READ A FILE IT WAS A BLITZMAX ISSUE. |
| ||
No. It was probably the way you had BlitzMax installed in the first place. Please listen to the advice people are trying to give you on how to code wisely. AND DON'T FLIPPIN' SHOUT !! |