Help With DoomPlayer Problem By Player Classes

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

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!)
Post Reply
ChaingunnerSlayer
Posts: 25
Joined: Fri Feb 19, 2021 2:15 pm

Help With DoomPlayer Problem By Player Classes

Post by ChaingunnerSlayer »

Hello friends can you help me in this small error that I have, it came out because I am creating a new DoomPlayer, I think it has to do with the Player classes that I have,

Script error, "ExtraDoomMod.zip:playertypes.txt" line 1:
Parent type 'NewPlayer' not found in RifleMarine
Script error, "ExtraDoomMod.zip:playertypes.txt" line 4:
"player.displayname" requires an actor of type "PlayerPawn"


Execution could not continue.

Script error, "ExtraDoomMod.zip:playertypes.txt" line 4:
Unexpected 'Rifle Start' in definition of 'RifleMarine'
ChaingunnerSlayer
Posts: 25
Joined: Fri Feb 19, 2021 2:15 pm

Re: Help With DoomPlayer Problem By Player Classes

Post by ChaingunnerSlayer »

these are my player classes

actor RifleMarine : NewPlayer
{
Speed 1.0
Player.DisplayName "Rifle Start"
Player.StartItem "AssaultRifle1"
Player.StartItem "PunchAndkick"
Player.StartItem "HeavyClip", 100
Player.startItem "FragGrenade"
Player.StartItem "FragGrenadeAmmo", 5
}

actor PistolMarine : NewPlayer
{
Speed 1.0
Player.DisplayName "Pistol Start"
Player.startitem "PistolM"
player.startitem "NormalClip", 50
Player.StartItem "PunchAndkick"
Player.startItem "FragGrenade"
Player.StartItem "FragGrenadeAmmo", 5
}
ChaingunnerSlayer
Posts: 25
Joined: Fri Feb 19, 2021 2:15 pm

Re: Help With DoomPlayer Problem By Player Classes

Post by ChaingunnerSlayer »

and this my doom player
Spoiler:
User avatar
Dan_The_Noob
Posts: 880
Joined: Tue May 07, 2019 12:24 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Help With DoomPlayer Problem By Player Classes

Post by Dan_The_Noob »

it seems like your NewPlayer class isn't in the same part of your mod as your RifleMarine/PistolMarine classes?
Jarewill
 
 
Posts: 1854
Joined: Sun Jul 21, 2019 8:54 am

Re: Help With DoomPlayer Problem By Player Classes

Post by Jarewill »

To be exact, it seems your NewPlayer class isn't being loaded or is being loaded after the classes that inherit from it.
Check your #includes in your main DECORATE file if the NewPlayer file is being included before the other class definitions.

If your class1 inherits from class2, that class2 has to be loaded before class1.
ChaingunnerSlayer
Posts: 25
Joined: Fri Feb 19, 2021 2:15 pm

Re: Help With DoomPlayer Problem By Player Classes

Post by ChaingunnerSlayer »

Thanks that was the problem :D
Post Reply

Return to “Scripting”