Hello! I'm not sure where to put this? But...I am getting this error and i'm not sure what's wrong?
Syntac error line 24 (tab 0)
If poison=9 then poisoned=true end
'Then' expected near '='
Here is my code I am working on...
function _init()
sprite=1
stimer=0
last_frame=4
first_frame=1
table={} --example
coin=false --example
string="dragon",23,"fist"
-- example
x1=25
y1=0
x2=50
y2=5
hcolor=8
poisoned=false
poison=0
end
function _update()
if poison<=9 then poison+=1 end
if poison=9 then poisoned=true end
if posioned=true then y1=y1-10 end
--if stimer<=7 then
--stimer+=1
--else
--if sprite<=last_frame then
--sprite+=first_frame
--else
--sprite=first_frame
--end
--stimer=0
--end
function _draw()
cls()
spr(sprite,64,64)
rectfill(x1,y1,x2,5,hcolor)
rect(x1,y1,x2,y2,7)--20,5,7
print("health",0,1,7)
--health bar combo
rectfill(50,15,30,10,10)
rect(50,15,30,10,7)--20,5,7
print("stamina",0,10,7)
--stamina bar combo!!!
end
Note: I commented out the animation code to attempt to debug the problem but, I am at a loss.
This is code based on following the tutorial's by spacecat.
Hello, all! I have a question about a project I am working on in pico 8 (Random name generator).
I tried rnd (command) at first and that failed for obvious reasons. And now I am in a pickle I can use print and say a = "tammy" and it work's.
But!
When I add more it only works on the first entry? In reading the manual it doesn't say anything that I can see that could help me. Online has been a bust though still interesting.
I also checked out the cart pico map generator (the world name generator part) which help's in that I need to write a function...? It is rather long (and beyond my understanding unless I squint really hard).
Anyone have any way to combine two (or more) names using the print command? Or something else?
Thank you, for your time!
Ps. I am still learning pico 8. I can make (very) simple games and I not versed in each command nor the terms.