FindStateLabelAndOffset: Couldn't find state!

Discuss all aspects related to modding Zandronum here.
Post Reply
ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

FindStateLabelAndOffset: Couldn't find state!

#1

Post by ZzZombo » Fri Jul 11, 2014 9:37 am

Code: Select all

actor Colt45:secondary replaces Pistol
{//$Category Infected Horde weaponry
	AttackSound				"weapons/Colt45_shot"
	Obituary				"$IH_KILL_COLT45"
	Tag						"Colt 45"
	Inventory.Pickupmessage "$IH_GOT_COLT45"
	States
	{
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("Colt45Giver")
		stop
		Select:
		COLT A 1 A_Raise
		loop
		Deselect:
		COLT A 1 A_Lower
		loop
		Ready:
		COLT A 1 A_WeaponReady
		loop
		Fire:
		TNT1 A 0 A_JumpIf(args[1]>0,2)
		COLT A 4 A_PlayWeaponSound("weapons/emptyclick")
		goto AltFire
		TNT1 A 0 A_GunFlash
		COLF A 1 A_FireBullets(5.2,1,1,7.5,"BulletPuff2")
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_SetArg(1,args[1]-1)
		COLF A 1 A_Light2
		COLF A 1 A_Light1
		COLT B 3 A_Light0
		COLT CDE 3
		COLT B 3 A_ReFire
		goto Ready
		Flash:
		COLF A 3 bright A_Light1
		COLF A 3 bright A_Light0
		stop
		AltFire:
		TNT1 A 0 A_JumpIf(args[1]>=20,"Ready")
		TNT1 A 0 A_JumpIfInventory("Colt45Clip",1,"Reload")
		goto Ready
		Reload:
		TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH)
		TNT1 A 0 A_PlayWeaponSound("weapons/colt45_clipout")
		COLT A 5 offset(0,40)
		COLT A 5 offset(0,80)
		COLT A 5 offset(0,100)
		COLT A 5 offset(0,120)
		COLT A 4 offset(0,140)
		COLT A 4 offset(0,150)
		COLT A 4 offset(0,160)
		TNT1 A 0 A_TakeInventory("Colt45Clip",1)
		TNT1 A 0 A_SetArg(1,20)
		TNT1 A 5 A_PlaySound("weapons/colt45_clipin")
		COLT A 3 offset(0,150)
		COLT A 3 offset(0,130)
		COLT A 3 offset(0,110)
		COLT A 2 offset(0,80)
		COLT A 2 offset(0,60)
		COLT A 2 offset(0,40)
		COLT A 2 offset(0,20)
		goto Ready
	}
}
Any reason for my weapon to spam the server's console with "FindStateLabelAndOffset: Couldn't find state!"? Args[1], is BTW how many ammo loaded into the pistol.

P. S. Otherwise the weapon works perfectly, so I don't know if this is something to worry about.
Last edited by ZzZombo on Fri Jul 11, 2014 9:39 am, edited 1 time in total.
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

User avatar
Ivan
Addicted to Zandronum
Posts: 2228
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: FindStateLabelAndOffset: Couldn't find state!

#2

Post by Ivan » Fri Jul 11, 2014 12:24 pm

It'd be wise to find when it starts spamming the console. I wanna bet it's on alt fire but can't really be sure.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: FindStateLabelAndOffset: Couldn't find state!

#3

Post by ZzZombo » Fri Jul 11, 2014 12:59 pm

It happens in the Fire state.
QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

User avatar
Ivan
Addicted to Zandronum
Posts: 2228
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

RE: FindStateLabelAndOffset: Couldn't find state!

#4

Post by Ivan » Fri Jul 11, 2014 2:23 pm

Ok then try and give a label to the jump of "args[1] > 0, 2" part. Like, "FireReal" then make it jump to "FireReal" instead of 2. See if it fixes it. Can't really help more than this as these bugs are trivial from what I experienced.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
Torr Samaho
Lead Developer
Posts: 1543
Joined: Fri May 25, 2012 6:03 pm
Location: Germany

RE: FindStateLabelAndOffset: Couldn't find state!

#5

Post by Torr Samaho » Fri Jul 11, 2014 4:53 pm

ZzZombo wrote: P. S. Otherwise the weapon works perfectly, so I don't know if this is something to worry about.
It's an internal Zandronum warning. You should be able suppress the warning by setting "sv_showwarnings 0". Still, you shouldn't get this warning, so this is a Zandronum bug. If you make a tracker ticket for the issue with a minimal example wad, we can look into this.

ZzZombo
Forum Regular
Posts: 323
Joined: Mon Jun 11, 2012 12:11 pm
Location: Ravenholm

RE: FindStateLabelAndOffset: Couldn't find state!

#6

Post by ZzZombo » Sat Jul 12, 2014 3:59 am

QZRcon - Qt-based tool for Zandronum/Skulltag servers!
#grandvoid funny stats

Post Reply