Closed ritchiecarroll closed 3 years ago
Hi, thanks for this - I'll look into it. Not immediately clear what's going on but I expect I'll be able to figure it out with the example code to reproduce.
Weird, this is not happening to me. Is there a sequence of keys I need to press to trigger the error?
long
type, which is somewhat surprising - all basic integers are 16-bit and should fit in regular int
int
vs long
issue is the whole of it, this won't happen if running in Python 3. Are you able to try?Fixed on develop
branch, will be included in next relrease
Bug report
FYI, Great program! I now have a way to run my old basic programs and convert the source to plain text - thanks so much!
Problem Had this issue below, see crash log - just providing you a heads-up in case it's something you have time to fix in the future.
This was a program I wrote when I was in high school that was published in the Rainbow Color Computer magazine, circa 1990.
See attached source: BLAKJACK.zip
Thanks, Ritchie
Crash log PC-BASIC crash log
FATAL ERROR version 2.0.3 [v2.0.2-1-820-g6807f35bb 2020-09-26 16:12:18.217000] python 2.7.18 [32bit WindowsPE] True platform Windows-10-10.0.20246 interface VideoSDL2, AudioSDL2 statement 1110 CIRCLE(4,4),3,C2:CIRCLE(10,4),3,C2:DRAW"C=C2;BM3,7F4E4":PAINT(4,4),C2:PAINT(10,4),C2:PAINT(7,6),C2:PSET(7,3),C2
graphics.py:462, _draw_line graphics.py:74, setitem buffers.py:60, setitem bytematrix.py:83, setitem TypeError: Can only assign ByteMatrix, list of bytes-like or int, not <type 'long'>.
This is a bug in PC-BASIC. Sorry about that. You can help improve PC-BASIC:
Please file a bug report, including this message and the steps you took just before the crash. Go to: https://github.com/robhagemans/pcbasic/issues
Please include the full crash log in your report. You can paste it from the clipboard or from the file at: C:\Users\ritchie\AppData\Roaming\pcbasic-2.0\crash-20201103-t1xpfa.log Traceback (most recent call last): File "pcbasic\guard.py", line 51, in protect File "pcbasic\main.py", line 119, in _run_session File "pcbasic\basic\api.py", line 149, in interact File "pcbasic\basic\implementation.py", line 315, in interact File "pcbasic\basic\interpreter.py", line 122, in loop File "pcbasic\basic\interpreter.py", line 112, in parse File "pcbasic\basic\parser\statements.py", line 82, in parsestatement File "pcbasic\basic\display\graphics.py", line 1000, in draw File "pcbasic\basic\display\graphics.py", line 1074, in _draw File "pcbasic\basic\display\graphics.py", line 1143, in _draw_step File "pcbasic\basic\display\graphics.py", line 462, in _draw_line File "pcbasic\basic\display\graphics.py", line 74, in setitem File "pcbasic\basic\display\buffers.py", line 60, in setitem File "pcbasic\basic\base\bytematrix.py", line 83, in setitem TypeError: Can only assign ByteMatrix, list of bytes-like or int, not <type 'long'>.