A bootup error regarding a ZSCRIPT monster?

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!)
User avatar
AshHouswares
Posts: 49
Joined: Fri Jun 03, 2022 11:31 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

A bootup error regarding a ZSCRIPT monster?

Post by AshHouswares »

I'm having a bootup error come up when I try to test out my zscripted monster. I'm not sure what the issue is, I've gone over it several times and I cannot see anything wrong.

THIS IS MY MONSTER CODE (ZSCRIPT)

Code: Select all

class Deadite : Actor
{
   Default
   {
   //$Category Monsters
        //$Title Deadite
   //$Sprite DEADA1
      Health 150;
      GibHealth 80;
      PainChance 180;
      Speed 10;
      Radius 30;
      Height 56;
      Mass 400;
      Renderstyle "Normal";
      Bloodcolor "Red";
      Monster;
          +DROPOFF
          +FLOORCLIP
          +TELESTOMP
          +DONTHARMCLASS
      SeeSound "deadite/sight";
                AttackSound "deadite/spit";
                PainSound "deadite/pain";
                DeathSound "deadite/death";
                ActiveSound "deadite/active";
      Obituary "$OB_DEMONHIT";
      Tag "$FN_DEMON";
   }
   States
   {
   Spawn:
      DEAD Z 10 A_Look;
      Loop;
   See:
      DEAD ABCD 8 Fast A_Chase;
      Loop;
   Melee:
      DEAD HI 8 Fast A_FaceTarget;
                DEAD J 8 Fast A_CustomMeleeAttack (random (2, 6) *5, "ClawHit", "skeleton/swing");
           DEAD HI 8 Fast A_FaceTarget;
                DEAD J 8 Fast A_CustomMeleeAttack (random (2, 6) *5, "ClawHit", "skeleton/swing");
      Goto See;
   Missile:
           DEAD EF 8 A_FaceTarget;
      DEAD G 8 A_CustomComboAttack("DeadBall", 32, 10 * random(1, 8));
           Goto See;
   Pain:
      DEAD K 2 Fast;
      DEAD K 2 Fast A_Pain;
      Goto See;
   Death:
      DEAD L 8;
      DEAD M 8 A_Scream;
      DEAD N 4;
      DEAD P 4 A_NoBlocking;
      DEAD Q 4;
      DEAD R 4;
      DEAD S 4;
      DEAD T -1;
      Stop;
   XDeath:
           XDED A 8;
      XDED B 8 A_Scream;
      XDED C 4; A_SpawnDebris ("DeadGuts", FALSE, 1.0, 1.0);
      XDED D 4; A_NoBlocking;
      XDED E 4;
      XDED F -1;
      Stop;
   Raise:
      DEAD T 5;
      DEAD SRQPNML 5;
      Goto See;
   }
}


The monster was working fine until I added in an XDEATH state (in order to add a nice A_SpawnDebris effect).

The error I'm getting is as follows:

Code: Select all

ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Script error, "EvilDeadAshes2Ashes.ipk3:zscript/deadite" line 70:
Unexpected ','
Expecting ';'

Script error, "EvilDeadAshes2Ashes.ipk3:zscript/deadite" line 71:
Unexpected ';'
Expecting ':' or non-whitespace


Execution could not continue.

2 errors while parsing EvilDeadAshes2Ashes.ipk3:zscript/cheats


Line 70 and line 71 in the ZSCRIPT monster file refers to this:

Code: Select all

   XDED C 4; A_SpawnDebris ("DeadGuts", FALSE, 1.0, 1.0);
      XDED D 4; A_NoBlocking;


But I cannot see anything wrong with this. Help?
User avatar
wildweasel
Moderator Team Lead
Posts: 21361
Joined: Tue Jul 15, 2003 7:33 pm

Re: A bootup error regarding a ZSCRIPT monster?

Post by wildweasel »

You have an extra semicolon where it is not needed, on both of these lines. A semicolon should only end the line - if there is an action function right after the duration, do not place a semicolon there.
User avatar
AshHouswares
Posts: 49
Joined: Fri Jun 03, 2022 11:31 am
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Not Listed

Re: A bootup error regarding a ZSCRIPT monster?

Post by AshHouswares »

Ahhh! Thank you so much. Can't believe I didnt notice that. Thank you again, wildweasel!

Return to “Scripting”