Register    Login    Forum    Search    FAQ

Board index » Reality Bites - The MOD » SCRIPTING HELP!




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Weapon troubles
 Post Posted: November 6th, 2009, 11:47 pm 
Offline
Embryo

Joined: November 6th, 2009, 11:39 pm
Posts: 1
I was testing and making a weapon for base tribes. It gives me 3 errors:
1. "Itemdata block "SuperGunAmmo" is undefined"
2. "Projectile data block "SuperGunProjectile" is undefined"
3. "ItemImage data block "SuperGunImage" is indefined"


Heres the code:


Code:
$AutoUse[SuperultramegaawesomepwnageGun] = true;
$WeaponAmmo[SuperultramegaawesomepwnageGun] = SuperultramegaawesomepwnageGunAmmo;
$SellAmmo[SuperultramegaawesomepwnageGunAmmo] = 10;

$InvList[SuperultramegaawesomepwnageGun] = 1;
$RemoteInvList[ SuperultramegaawesomepwnageGun] = 1;
$InvList[SuperultramegaawesomepwnageGunAmmo] = 1;
$RemoteInvList[ SuperultramegaawesomepwnageGunAmmo] = 1;

$ItemMax[larmor, SuperultramegaawesomepwnageGun] = 1;
$ItemMax[marmor, SuperultramegaawesomepwnageGun] = 1;
$ItemMax[harmor, SuperultramegaawesomepwnageGun] = 1;
$ItemMax[lfemale, SuperultramegaawesomepwnageGun] = 1;
$Itemmax[mfemale, SuperultramegaawesomepwnageGun] = 1;

$ItemMax[larmor, SuperultramegaawesomepwnageGunAmmo] = 45;
$ItemMax[marmor, SuperultramegaawesomepwnageGunAmmo] = 65;
$ItemMax[harmor, SuperultramegaawesomepwnageGunAmmo] = 85;
$ItemMax[lfemale, SuperultramegaawesomepwnageGunAmmo] = 45;
$Itemmax[mfemale, SuperultramegaawesomepwnageGunAmmo] = 65;

BulletData SuperultramegaawesomepwnageGunProjectile
{
   bulletShapeName = "shotgunbolt.dts";
   explosionTag = rocketExp;

   damageClass = 0;
   damageValue = 4;
   damageType = $ShrapnelDamageType;

   muzzleVelocity = 3;
   totalTime = 1;
   liveTime = 3;

   inheritedVelocityScale = 0.5;

};

ItemData SuperultramegaawesomepwnageGunAmmo
{
   description = "Superultramegaawesomepwnage Gun Ammo";
   className = "Ammo";
   shapeFile = "mortarammo";
   heading = "xAmmunition";
   shadowDetailMask = 4;
   price = 50;
};

ItemImageData SuperultramegaawesomepwnageGunImage
{
   shapeFile = "energygun";
   mountpoint = 0;

   weaponType = 0;
   fireTime = 1.5;
   reloadTime = 1;

   ammoType = SuperultramegaawesomepwnageGunAmmo;
   projectileType = SuperultramegaawesomepwnageGunProjectile;
   accuFire = false;

   lightType = 3;
   lightRadius = 3;
   lightTime = 1;
   lightColor = { 1, 1, 1 };

   sfxFire = SoundDryFire;
   sfxActivate = SoundPickupWeapon;
   sfxReload = SoundMortarReload;
};

ItemData SuperultramegaawesomepwnageGun
{
   description = "Superultramegaawesomepwnage Gun";
   className = "Weapon";
   shapeFile = "energygun";
   hudIcon = "blaster";
   heading = "bWeapons";
   shadowDetailMask = 4;
   imageType = SuperultramegaawesomepwnageGunImage;
   price = 500;
   showWeaponBar = true;
};



i dont know what the problem is.ive never had this problem on any other tribes mod.
anybody have a clue as to what the problem is?


Top 
 Profile  
 
 Post subject: Re: Weapon troubles
 Post Posted: November 7th, 2009, 9:42 pm 
Offline
Site Admin
User avatar

Joined: December 31st, 1969, 5:00 pm
Posts: 905
Location: Passed out in an alley
The reason you have those errors is because you didn't define any of those.

I searched for "SuperGunAmmo" and don't see it defined anywhere in your code. You have to create SuperGunAmmo before it can be used. This is the same for the rest of those errors. I'm assuming you have a weapon somewhere else in your script that is calling on that ammotype. Do a text search in your script to see where that ammo name is called.

On a side note, the description of your guns and ammo is so ridiculously long that Tribes will simply cut off half of the name in the inventory station. Shorten the names to 16 characters or less.

Also, with item names that long, the chances of mistyping one in the script is incredibly large, and I guarantee it will cause you to screw up your script. Shorten the names of your items or you'll hate yourself later.

_________________
Have you ever tried just turning off the TV, sitting down with your children, and hitting them?


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 2 posts ] 

Board index » Reality Bites - The MOD » SCRIPTING HELP!


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron