Log In  


Cart #test_102-1 | 2025-07-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

A very simple cart to test stat(102) and load("#id").

Note: I used tiny tactics, my first PICO-8 game, as an example of a BBS cart.

Value returned by stat(102) depending on how the cart is run:

  • number 0 when running .p8 file in PICO-8.
  • number 0 when running cart from SPLORE.
  • number 0 when running Windows .exe standalone.
  • empty string when running .html standalone export directly from filesystem.
  • "www.lexaloffle.com" string when running from BBS forum post.

When load("#id") works:

  • when ruuning .p8 file in PICO-8.
  • when running from BBS forum post.
  • when running from SPLORE.

When load("#id") doesn't work:

  • when running Windows .exe standalone.
  • when running .html standalone export directly from filesystem.

Note: the .html standalone shows a DOWNLOAD FAILED error message on the bottom of the screen, but the standalone Windows executable does not.

Code is so simple I decided to include it here as a snippet.

-- test_102
-- by andrejtrindade

function _init()
	s102 = stat(102)
end

function _update()
	if (btnp(5)) load("#tiny_tactics", "load test_102")
end

function _draw()
	cls()
	color(7)
	print("stat(102):",0,0)
	print("["..s102.."]",0,6)
	print("type:"..type(s102),0,18)
	print("")
	print("press ❎ to load tiny tactics")
end

I hope the above results are useful.




[Please log in to post a comment]