Tic-80: save code.js command saves Lua file instead of JS one

Created on 25 Aug 2020  路  6Comments  路  Source: nesbox/TIC-80

Reproduction steps: just run save anything.js and the file will contain JS code instead of Lua code.

TIC-80 0.80.1281-dev

bug

Most helpful comment

Should be fixed in .80
Thank you.

All 6 comments

Should be fixed in .80
Thank you.

I can't reproduce the issue.
TIC80 creates Lua cart by default and if you run save game.js you will get game.js with Lua code inside.
To create JS cart pls use new js command and then save game.js.
So, I don't see any problems here, closing...

@nesbox I'm terribly sorry! I've just found out that I confused with languages and wrote a misleading sentence.

I meant that when you type save *.js, it creates a file with .js extension but Lua code inside, which is incorrect. Running save *.lua creates a Lua file with .lua extension and Lua code inside, so I expected that if I put js instead of lua, I'll have code written in JS accordingly.

Nevertheless, I see that extension shouldn't save a different file because the content is taken from the cart, which script is Lua by default.

save command just saves a file with a given name not paying attention to the script type in a cart, I think you should care about the script in the cart, not TIC.

I got it. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

codeartisticninja picture codeartisticninja  路  4Comments

Skaruts picture Skaruts  路  5Comments

Spreit picture Spreit  路  4Comments

fangzhangmnm picture fangzhangmnm  路  3Comments

Terumoc picture Terumoc  路  6Comments