sys(coincount) bugs [solved]

Description: Report bugs of SMBX-38A here.
Forum rules: https://wohlsoft.ru/forum/viewtopic.php?f=64&t=1069
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 402
Posts: 757
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 8 Dec 2019, 17:55

1. When the coin counter reach the value of 99 (through scripts) it gets stuck there:
Image

Code: Select all

do
   sys(coincount) = sys(coincount) + 1
   call sleep(1)
loop

If the value is equal or greater than coinsforextralife (default: 100) it should subtract this value and give the player(s) 1-up (the normal operation of coins).

2. For some reason, this won't work

Code: Select all

sys(coincount) += 1

But this will:

Code: Select all

sys(coincount) = sys(coincount) + 1

Even when both are the same thing. (It's the only variable I've found so far with this issue.

EDIT: now in patch 26 "sys(coincount) += 1" drops the error "Cannot assign a non-numeric to a number".
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

Void
Bat
Bat
Avatar
Void
Bat
Bat
Age: 21
Reputation: 102
Posts: 279
Joined: 18 Apr 2014
Location: [REDACTED]

Post #2by Void » 14 Dec 2019, 3:39

Lx Xzit wrote:1. When the coin counter reach the value of 99 (through scripts) it gets stuck there:
Image

Code: Select all

do
 sys(coincount) = sys(coincount) + 1
 call sleep(1)
loop

If the value is equal or greater than coinsforextralife (default: 100) it should subtract this value and give the player(s) 1-up (the normal operation of coins).

2. For some reason, this won't work

Code: Select all

sys(coincount) += 1

But this will:

Code: Select all

sys(coincount) = sys(coincount) + 1

Even when both are the same thing. (It's the only variable I've found so far with this issue.=
Not only that, but if coinsforextralife is greater than 100 and the coincount is greater than 99 and less than coinsforextralife, when the player returns to the world map and reenters a level, a 1-up is immediately given to the player.
Join the SMBX 38a Discord Server!
Image

sweep a leaf sweep away a troubles

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 402
Posts: 757
Joined: 9 Nov 2015
Website

Post #3by Lx Xzit » 15 Dec 2019, 21:14

Bump. None of these problems has been addressed and 38a didn't give me a reply whether or not this is really a bug nor how to deal with it.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

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

Post #4by NESTED ERNEST » 17 Dec 2019, 19:53

Code: Select all

do   
    if sysval(coincount)=sysval(coinsforextralife)-1  then       
        sysval(playerhealth)=sysval(playerhealth)+1
        sysval(coincount)=0
      call audioset(2,15,0,"")      
   else
      sysval(coincount)=sysval(coincount)+1
    end if
   
    call sleep(1)
loop
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 “SMBX-38A Bug reports”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest