Log In  

Version 0.1.0e on Windows 10

Strings cannot be indexed using var[n]. This is different to Pico-8, where strings are indexable. However, for Picotron, it may be by design as strings are not indexable in Lua itself.

a = "string"
print(a[2])

--> outputs nil (should be 't')

A workaround for the time being is to use sub(a, 2, 2)

P#145214 2024-03-31 05:39 ( Edited 2024-04-01 03:37)


[Please log in to post a comment]