So I'm working on a brainf*** interpreter and I'm testing parentheses out right now. But theres a problem. I'm trying to implement "[", but when I run this code:
[]+ Pico-8 Just Crashes on me!
Here's what I'm having trouble with:
if(t[u]=="["and c[ti]==0) then tf=u repeat until t[tf]=="]" do tf+=1 cls() end u=tf end |
T is the text variable responsible for storing [,],+,Etc
U is the counter.
I have mapped
[ to up,
] to left, and
- to right.
Z =backspace
X = run
Try "[]+" in the code and you'll see what I mean.
hi, if this is still an issue (im 3 days late) could i please know why are you using repeat until like that, maybe you wanted to do:
repeat tf+=1 cls() until t[tf]=="]" |
@851523
Thank you! it works!
and no, you're not late. i've been busy a lot so I haven't had time to fix these myself.
@851523 Your advice worked so well that I "Finished" My project! (I put that in quotes because https://www.lexaloffle.com/bbs/?pid=154970#p)
Check it out!
https://www.lexaloffle.com/bbs/?tid=144582#comments
[Please log in to post a comment]