Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Soup

Bad numeric constant "Loop"

Recommended Posts

So, i was scripting some stuff, and i got an error saying "SC_GetNumber: Bad numeric constant "Loop"."

Here's the code:

 

  Height 128
  Mass 10
  Speed 24
  PainChance 20
  Monster
  MinMissileChance 160
  +BOSS
  +MISSILEMORE
  +FLOORCLIP
  +NORADIUSDMG
  +DONTMORPH
  +BOSSDEATH
  SeeSound "cyber/sight"
  PainSound "cyber/pain"
  DeathSound "cyber/death"
  ActiveSound "cyber/active"
  Obituary "$OB_CYBORG"
  States
  {
  Spawn:
    STWA 10
    Loop
  See:
    STWA 1 A_Chase
    Loop
  Missile:
    STAA 6 A_FaceTarget
    STAB 12 A_CyberAttack
    STAA 12 A_FaceTarget
    STAB 12 A_CyberAttack
    STAA 12 A_FaceTarget
    STAB 12 A_CyberAttack
    Goto See
  Pain:
    STWA 10 A_Pain
    Goto See
  Death:
    STDA 10
    STGA 10 A_Scream
    STGB 10
    STGC 10 A_NoBlocking
    STGC NO 10
    STGC 30
    STGC -1 A_BossDeath
    Stop
  }
}

Is there something wrong?

Share this post


Link to post

You might be writing sprite names wrong...
Usually it's something like TROOP A like with the imp, and I think it expects the space and letter before looking for how long the state lasts.
For the spawn state I'm assuming the sprite name you need to write is STW A...
Does
STW A 10
work in the spawn state, then?

Share this post


Link to post
4 minutes ago, Alper002 said:

You might be writing sprite names wrong...
Usually it's something like TROOP A like with the imp, and I think it expects the space and letter before looking for how long the state lasts.
For the spawn state I'm assuming the sprite name you need to write is STW A...
Does
STW A 10
work in the spawn state, then?

Nope, it gives me the "Sprite names must be exactly 4 characters" error, and i'm using custom sprites.

Share this post


Link to post

Then I think you'll need to rename the custom sprites within the wad so they work for DECORATE.

Four letters for sprite name, and then one letter for the specific frame, and then angle indicator.

Share this post


Link to post
4 minutes ago, Alper002 said:

Then I think you'll need to rename the custom sprites within the wad so they work for DECORATE.

Four letters for sprite name, and then one letter for the specific frame, and then angle indicator.

Nope, still giving me "Sprite names must be exactly 4 characters" error.

Share this post


Link to post
2 minutes ago, Vermil said:

The frame letter doesn't count as the 'sprite name'.

 

i.e TROOA1, TROOA2A8 etc

Tried it out, still giving me the "SC_GetNumber: Bad numeric constant "Loop" error

Share this post


Link to post
39 minutes ago, Soup said:

  States

  {
  Spawn:
    STWA 10
    Loop
  See:
    STWA 1 A_Chase
    Loop
  Missile:
    STAA 6 A_FaceTarget
    STAB 12 A_CyberAttack
    STAA 12 A_FaceTarget
    STAB 12 A_CyberAttack
    STAA 12 A_FaceTarget
    STAB 12 A_CyberAttack
    Goto See
  Pain:
    STWA 10 A_Pain
    Goto See
  Death:
    STDA 10
    STGA 10 A_Scream
    STGB 10
    STGC 10 A_NoBlocking
    STGC NO 10
    STGC 30
    STGC -1 A_BossDeath
    Stop
  }
}

Is there something wrong?

Yes. All your lines are wrong except the one I've bolded and underlined.

 

The problem with your code is that you're not actually defining any state here (except on that single line I've emphasized). You're opening state declarations, with a sprite name, and then you jump to the duration instead of giving the actual states (aka frames). I'll refer you to the wiki: https://zdoom.org/wiki/Actor_states

 

Share this post


Link to post
1 minute ago, Gez said:

Yes. All your lines are wrong except the one I've bolded and underlined.

 

The problem with your code is that you're not actually defining any state here (except on that single line I've emphasized). You're opening state declarations, with a sprite name, and then you jump to the duration instead of giving the actual states (aka frames). I'll refer you to the wiki: https://zdoom.org/wiki/Actor_states

 

Oh okay, thanks alot.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×