Page 1 of 1

Decorate label problem

Posted: Thu Nov 15, 2007 12:43
by Azure Agony
Hi! I got problem with latest version of GZDoom 1.0.29, it's look like this:

Script error, "DECORATE" line 219:
Expected string constant but got identifier 'Reload' instead.

In 1.0.27 everything was all right. Line 219 looks like:
...
DPPT A 0 A_JumpIfInventory("IsReloading",1,Reload)
...

and if I change reload label like this:
...
DPPT A 0 A_JumpIfInventory("IsReloading",1,"Reload")
...
GZDoom pass me through but weapons doesn't reload. Could somebody help me with this?
Thanks!

Posted: Fri Nov 16, 2007 8:56
by Nash
That's not really helpful. You need to post the full DECORATE script.

Posted: Fri Nov 16, 2007 13:46
by Azure Agony
Well, code looks like this:
ACTOR DPPistol : Weapon 20667
{
//$Category weapons
Weapon.SelectionOrder 1900
Inventory.PickupMessage "You got the pistol"
Weapon.AmmoType1 "ExtraPistolAmmo"
Weapon.AmmoUse1 1
Weapon.AmmoGive2 10
Weapon.AmmoType2 "Clip"
Weapon.AmmoUse2 0
Weapon.Kickback 40
Decal BulletChip
Radius 12
Height 12
Scale 0.15
+AMMO_OPTIONAL
+NOEXTREMEDEATH
// +NOAUTOFIRE
States
{
Spawn:
DPPI A -1
LOOP
Select:
DPPT A 1 A_Raise
Loop
Deselect:
DPPT A 1 A_Lower
Loop
Ready:
DPPT A 1 A_WeaponReady
DPPT A 0 A_JumpIfInventory("IsReloading",1,Reload)//HERE ARE PROBLEMS IF I CHANGE FOR DPPT A 0 A_JumpIfNoAmmo("Reload") GZDOOM PASS ME THROUGH BUT WEAPON DOESN'T RELOAD
Loop
Fire:
DPPT A 0 A_JumpIfNoAmmo(DryFire)//HERE ARE PROBLEMS IF I CHANGE FOR DPPT A 0 A_JumpIfNoAmmo("DryFire") GZDOOM PASS ME THROUGH BUT WEAPON DOESN'T RELOAD
PISG A 4 A_FireCustomMissile("PistolSmokeSpawner",0,0,6,8)
PISG B 6 A_FirePistol
PISG C 4 A_FireCustomMissile("9mmCasingSpawner",-3,0,0,0)
PISG B 5 A_ReFire
Goto Ready
DryFire:
DPPT A 1 A_PlayWeaponSound("DPPistol/noammo")
DPPT A 5
Reload:
DPPT A 1
DPPR A 0 A_JumpIfInventory("ExtraPistolAmmo", 10, "Ready")
DPPR A 0 A_JumpIfInventory("Clip", 1, 1)
Goto Ready
DPPR A 3
DPPR B 6 A_PlaySound("DPPistol/out")
DPPR C 3 A_PlaySound("DPPistol/in")
DPPR D 6
DPPR E 3 A_FireCustomMissile("SpentClip1",3,0,5,0)
DPPR FG 3
DPPR G 6
DPPR HI 3
ReloadWorking:
DPPR I 0 A_TakeInventory("Clip", 1)
DPPR I 0 A_GiveInventory("ExtraPistolAmmo", 1)
DPPR I 0 A_JumpIfInventory("ExtraPistolAmmo",10,2)
DPPR I 0 A_JumpIfInventory("Clip",1,2)
DPPR I 0
Goto ReloadFinish
DPPR I 0
Goto ReloadWorking
ReloadFinish:
DPPT A 0
Goto Ready + 1
AltFire:
DPPM A 3
DPPM B 2
DPPM C 1 A_PlayWeaponSound("melee/swing")
DPPM DE 1
DPPM F 1 A_CustomPunch(2,0,0,"hitpuff")
DPPM GHIJ 1
DPPM K 2
Goto Ready+1
Flash:
PISF A 7 Bright A_Light1
Goto LightDone
PISF A 7 Bright A_Light1
Goto LightDone
}
}

ACTOR ExtraPistolAmmo : Ammo
{
Inventory.MaxAmount 10
Inventory.Icon PISTA0
}

As I said code works good in 1.0.27 version.
p.s. Code is based on Wild Weasel's ww-magop.wad decorate
p.s.2. Great thanks for help, Wild Weasel!

Posted: Fri Nov 16, 2007 21:49
by Nash
Just a shot in the dark, but how about changing all the states that have 0 duration to 1 duration?

Try that first and see if it helps.

(Don't forget to quote your strings)

Posted: Sat Nov 17, 2007 7:07
by Azure Agony
If I change duration I'll see frames which I should not to see :D
But I did it - and it doesn't work :D
The code is good, it just doesn't run with latest verson of GZDoom. If you don't believe try Wild Weasel's ww-magop.wad it doesn't run too. GZDoom shows this same error.
Damn, I have to stay in 1.0.27 version! :?

Posted: Sat Nov 17, 2007 18:57
by Nash
Sorry, I'm out of ideas. Maybe Graf Zahl can see what the problem is.

Posted: Mon Nov 19, 2007 18:36
by Graf Zahl