Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 'line' built in function crashes when called #2316

Closed
Tracked by #2315
jezv opened this issue Sep 28, 2023 · 2 comments
Closed
Tracked by #2315

python 'line' built in function crashes when called #2316

jezv opened this issue Sep 28, 2023 · 2 comments

Comments

@jezv
Copy link

jezv commented Sep 28, 2023

version 1.1.2736 (59ab359)
windows 11

repro steps:

  1. .\tic80.exe --fs=./test --scale=6
  2. new python
  3. ESC to enter code editor
  4. below the hello world print, add the following line call
 print("HELLO WORLD!",84,84)
 line(84,84,91,91,1)

at runtime you I get the following error

>error while running TIC

>Traceback (most recent call last):
  File "<c-bound>", line 32
    line(84,84,91,91,1)
  File "<c-bound>", line 1
    def line(x0, y0, x1, y1, color) : 
_line(int(x0), int(y0), int(x1), 
int(y1), int(color))
TypeError: expected 'float', but got 
'int'

line(84.0,84.0,91.0,91.0,1.0)

this gives me the same result

@blueloveTH
Copy link
Contributor

I think this was solved by #2315

@nesbox
Copy link
Owner

nesbox commented Oct 8, 2023

fixed with #2315

@nesbox nesbox closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants