hello , im very very new to doom modding , and i have some odd issues and it doesnt matters what i do to the script i get the same error
Execution could not continue.
Script error, "1911 pistol.wad:DECORATE" line 11:
Expected '{', got 'Default'.
theres the whole script
ACTOR SilencedPistol: DoomPlayer {
Player.WeaponSlot 1, Fist
Player.WeaponSlot 2, Pistol, SilencedPistol
Player.WeaponSlot 3, Shotgun, SuperShotgun
Player.WeaponSlot 4, Chaingun
Player.WeaponSlot 5, RocketLauncher
Player.WeaponSlot 6, PlasmaRifle
Player.WeaponSlot 7, BFG9000
}
{
Default
{
inventory.PickupMessage "got the 1911 pistol";
Weapon.SelectionOrder 250;
Weapon.AmmoType "clip";
Weapon.AmmoGive 8;
Weapon.AmmoUse 1;
Weapon.SlotNumber 2;
Attacksound "weapons/Fire";
}
States
{
Spawn:
STND A -1;
Stop;
Ready:
SSSS A 1 A_WeaponReady;
Loop;
Select:
SSSS A 1 A_Raise;
Loop;
Deselect:
SSSS A 1 A_Lower;
Loop;
Fire:
SSSS BCD 4;
Goto SilencedPistolFire
SilencedPistolFire:
SSSS B 0 A_PlaySound("Weapons/Fire", CHAN_WEAPON, 0.7)
SSSS B 1 A_FireBullets(1,1,69,20,"bulletPuff")
SSSS C 1
SSSS D 1
SSSS D 1 A_Refire
Goto Ready
}
}
Script error
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Re: Script error
The default block for an actor should be declared by using the word "default" followed by the things that you want inside the block, surrounded by braces.
You open a brace before the word default that shouldn't be there.
However, your code is confusing - and I'm surprised it got as far as line 11 before throwing up an error.
You are inheriting from Doomplayer (presumably to try and change the weapon slot allocations). However, you are not creating a player actor, but a weapon. So that's not right.
You also have a mixture of DECORATE and ZScript syntax.
I can't guarantee that the following ZScript will work/do what you want, but the game should at least start with it loaded.
You open a brace before the word default that shouldn't be there.
However, your code is confusing - and I'm surprised it got as far as line 11 before throwing up an error.
You are inheriting from Doomplayer (presumably to try and change the weapon slot allocations). However, you are not creating a player actor, but a weapon. So that's not right.
You also have a mixture of DECORATE and ZScript syntax.
I can't guarantee that the following ZScript will work/do what you want, but the game should at least start with it loaded.
Code: Select all
Class SilencedPistol: Weapon
{
Default
{
inventory.PickupMessage "got the 1911 pistol";
Weapon.SelectionOrder 250;
Weapon.AmmoType "clip";
Weapon.AmmoGive 8;
Weapon.AmmoUse 1;
Weapon.SlotNumber 2;
Attacksound "weapons/Fire";
}
States
{
Spawn:
STND A -1;
Stop;
Ready:
SSSS A 1 A_WeaponReady;
Loop;
Select:
SSSS A 1 A_Raise;
Loop;
Deselect:
SSSS A 1 A_Lower;
Loop;
Fire:
SSSS BCD 4;
Goto SilencedPistolFire;
SilencedPistolFire:
SSSS B 0 A_PlaySound("Weapons/Fire", CHAN_WEAPON, 0.7);
SSSS B 1 A_FireBullets(1,1,69,20,"bulletPuff");
SSSS C 1;
SSSS D 1;
SSSS D 1 A_Refire;
Goto Ready;
}
}
-
- Posts: 3
- Joined: Sat Jun 14, 2025 10:55 am
Re: Script error
i realized something and i feel really dumb , the entry in the wad was in decorate and i changed it and it worked , thank you sir , as floppy as i made this thing it works now
Re: Script error
Glad you got it working. No need to feel dumb, especially when you are learning new skills.