Why doesn't it work???

Description: Subforum dedicated to SMBX-38A - a fan-made remake of the original SMBX Engine, made by 5438A38A.
Forum rules: This is official Europan/American community for the SMBX-38A. Suggested to don't post stuff for this engine outside this subforum.
Moderators: Lx Xzit, Yoshi021, 5438A38A, Moderators, Semi-moderatos

PunLord666
Topic author, Passerby
Passerby
PunLord666
Topic author, Passerby
Passerby
Reputation: 1
Posts: 2
Joined: 23 Aug 2022

Post #1by PunLord666 » 23 Aug 2022, 3:26

For some reason the script doesn't work, can anyone tell what is wrong

Code: Select all

if val(health) = 7 then
call Lset(HP2, 1, 1) end if

if val(health) = 6 then
call Lset(HP3, 1, 1) end if

if val(health) = 5 then
call Lset(HP4, 1, 1) end if

if val(health) = 4 then
call Lset(HP5, 1, 1) end if

if val(health) = 3 then
call Lset(HP6, 1, 1) end if

if val(health) = 2 then
call Lset(HP7, 1, 1) end if

NESTED ERNEST M
Count
Count
Avatar
NESTED ERNEST M
Count
Count
Reputation: 71
Posts: 271
Joined: 23 Sep 2017
Location: Perú, Lima
Youtube channel URL

Post #2by NESTED ERNEST » 27 Feb 2023, 3:23

In the variables table, create the variable called health and the word 'end if' that is on a separate line.
Programming NPCs in SMBX-38A is fun:
That is me
Image
Image
Image
Image
Special image
  • yt-image-banner: https://yt3.ggpht.com/M_O1AzQEOJogSq5OJESIaA5kFLdbwdDNMihDOJkJgPiH7cOx-LWK41TU9GWzExmkmpn3EWYbJg=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj
  • image-to-up: https://3.bp.blogspot.com/-Y-LrpIS2rqw/UCBTtk7k-pI/AAAAAAAABBs/qZuI0sCStkc/s1600/jean-baptiste+beaudelle+girafe++escargot.jpg
  • image-to-left: https://us.123rf.com/450wm/trassnick/trassnick2007/trassnick200700002/152919781-el-marl%C3%ADn-negro-grande-salta-del-mar-pesca-extrema-del-pez-espada-negro-en-alta-mar-vacaciones-en-lo.jpg
  • image-last-w: 1

ROCKMAN GIF IN SMBX 38A

Image


Return to “Super Mario Bros. X by 38A (SMBX-38A)”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest