Author Topic: Syntax Error Destructo Gun  (Read 689 times)

I am making a Destructo gun and i am having a problem with the code

Code: [Select]
Loading Add-On: Tool_DestructoGun (CRC:778720298)
Add-Ons/Tool_DestructoGun/server.cs Line: 17 - Syntax error.
>>> Some error context, with ## on sides of error halt:
   filename    = "./HL2Shot1.wav";

   description = AudioClose3d;

   preload = true;

};

datablock AudioProfile(DestructobulletHitSound)

{

   filename    = "add-ons/Weapon_Gun/bulletHit.wav";

   description = AudioClose3d;

   preload = true;



//shell

datablock DebrisData(##e##structogunShellDebris)

{

^shapeFile = "add-ons/Weapon_Gun/gunShell.dts";

^lifetime = 2.0;

^minSpinSpeed = -400.0;

^maxSpinSpeed = 200.0;

^elasticity = 0.5;

^friction = 0.2;

^numBounces = 3;

^staticOnMaxBounce = true;

^snapOnMaxBounce = false;

^fade = true;
>>> Error report complete.

ADD-ON "Tool_DestructoGun" CONTAINS SYNTAX ERRORS
I original had it as destructogunshell but changed it when it said that was the error it then changed to the e.

Code: [Select]
datablock DebrisData(##e##structogunShellDebris)I think it should be

Code: [Select]
datablock DebrisData(destructogunShellDebris)
You named it estructo

Yeah I erased the d when it said that was the problem but I will try it again. Tryed again mostly the same error just differn't letter.
Code: [Select]
Loading Add-On: Tool_DestructoGun (CRC:-1447962797)
Add-Ons/Tool_DestructoGun/server.cs Line: 17 - Syntax error.
>>> Some error context, with ## on sides of error halt:
   filename    = "add-ons/Weapon_Gun/GunShot1.wav";

   description = AudioClose3d;

   preload = true;

};

datablock AudioProfile(DestructobulletHitSound)

{

   filename    = "add-ons/Weapon_Gun/bulletHit.wav";

   description = AudioClose3d;

   preload = true;



//shell

datablock DebrisData(##D##estructogunShellDebris)

{

^shapeFile = "add-ons/Weapon_Gun/gunShell.dts";

^lifetime = 2.0;

^minSpinSpeed = -400.0;

^maxSpinSpeed = 200.0;

^elasticity = 0.5;

^friction = 0.2;

^numBounces = 3;

^staticOnMaxBounce = true;

^snapOnMaxBounce = false;

^fade = true;
>>> Error report complete.

ADD-ON "Tool_DestructoGun" CONTAINS SYNTAX ERRORS
« Last Edit: April 11, 2009, 04:31:05 PM by MagicAhrim »

I wish i knew, try putting a " on both sides so it looks like
Code: [Select]
("DestructogunShellDebris")If that doesn't work, remove them and make the D lowercase. By the way, respond to my email.

I wish i knew, try putting a " on both sides so it looks like
Code: [Select]
("DestructogunShellDebris")If that doesn't work, remove them and make the D lowercase. By the way, respond to my email.
Tried both ideas neither worked.

Code: [Select]

datablock AudioProfile(DestructobulletHitSound)

{

   filename    = "add-ons/Weapon_Gun/bulletHit.wav";

   description = AudioClose3d;

   preload = true;

};

datablock DebrisData(destructogunShellDebris)

{

^shapeFile = "add-ons/Weapon_Gun/gunShell.dts";

^lifetime = 2.0;

^minSpinSpeed = -400.0;

^maxSpinSpeed = 200.0;

^elasticity = 0.5;

^friction = 0.2;

^numBounces = 3;

^staticOnMaxBounce = true;

^snapOnMaxBounce = false;

^fade = true;
};

if this doesnt work change  the }; to }