RuneStorm
http://www.runestorm.com/forums/

BWRPG Questions - Default Properties error
http://www.runestorm.com/forums/viewtopic.php?f=69&t=74763
Page 1 of 1

Author:  QuadraxisMk2 [ Wed Sep 24, 2008 3:01 pm ]
Post subject:  BWRPG Questions - Default Properties error

Hello, I seem to have a slight problem with an "Unexpected For" error.

Code:
function GiveTo(Pawn Other, optional Pickup Pickup)
{
    local int m;
    local weapon w;
    local bool bPossiblySwitch, bJustSpawned;
    local Inventory Inv;

    Instigator = Other;
    ModifiedWeapon.Instigator = Other;
    for (Inv = Instigator.Inventory; true; Inv = Inv.Inventory)
    {
       if (Inv.Class == ModifiedWeapon.Class || (RPGWeapon(Inv) != None && !RPGWeapon(Inv).AllowRPGWeapon(Self)))
       {
      W = Weapon(Inv);
      break;
       }
       m++;
       if (m > 1000)
          break;
       if (Inv.Inventory == None) //hack to keep Inv at last item in Instigator's inventory
          break;
    }

    if ( W == None )
    {
   //hack - manually add to Instigator's inventory because pawn won't usually allow duplicates
   Inv.Inventory = self;
   Inventory = None;
   SetOwner(Instigator);
   if (Instigator.Controller != None)
      Instigator.Controller.NotifyAddInventory(self);

   bJustSpawned = true;
        ModifiedWeapon.SetOwner(Owner);
        bPossiblySwitch = true;
        W = self;
    }
    else if ( !W.HasAmmo() )
       bPossiblySwitch = true;

    if ( Pickup == None )
        bPossiblySwitch = true;

    for (m = 0; m < NUM_FIRE_MODES; m++)
    {
        if ( ModifiedWeapon.FireMode[m] != None )
        {
            ModifiedWeapon.FireMode[m].Instigator = Instigator;
            W.GiveAmmo(m,WeaponPickup(Pickup),bJustSpawned);
        }
    }

   if ( (Instigator.Weapon != None) && Instigator.Weapon.IsFiring() )
      bPossiblySwitch = false;

   if ( Instigator.Weapon != W )
      W.ClientWeaponSet(bPossiblySwitch);

    if (Instigator.Controller == Level.GetLocalPlayerController()) //can only do this on listen/standalone
    {
          if (bIdentified)
      PlayerController(Instigator.Controller).ReceiveLocalizedMessage(class'IdentifyMessage', 1,,, self);
   else if (ModifiedWeapon.PickupClass != None)
          PlayerController(Instigator.Controller).ReceiveLocalizedMessage(ModifiedWeapon.PickupClass.default.MessageClass, 0,,,ModifiedWeapon.PickupClass);
    }

   SetHolderStatsInv();

    if ( !bJustSpawned )
    {
        for (m = 0; m < NUM_FIRE_MODES; m++)
        {
            Ammo[m] = None;
            ModifiedWeapon.Ammo[m] = None;
        }
   Destroy();
    }
    else
    {
       //Hack for ChaosUT: spawn ChaosWeapon's ammo and make sure it sets up its firemode for the type of chaos ammo owner has
       +223
       5.6+6++
      }
       }

   [color=#FF0000]for (m = 0; m < NUM_FIRE_MODES; m++)[/color]
      Ammo[m] = ModifiedWeapon.Ammo[m];
    }
}


Problem is, I did NOT edit this side of the code (yet), and it throws this error.
(where the color=#FF0000 is, thats where the error leads to)

I have all the BCore Files and Ut2004 RPG files in one folder, so it compiles it all into one package. Not sure if this is the problem.

Any help will be appreciated.

Author:  OCAdam [ Wed Sep 24, 2008 3:28 pm ]
Post subject:  Re: BWRPG Questions - Unexpected For

Maybe you should just delete that bit of code. Notice how it's a HACK FOR CHAOS UT. Obviously since this RPG is not going be useable for anything BUT BW... kinda useless anyways.

Author:  QuadraxisMk2 [ Thu Sep 25, 2008 6:34 am ]
Post subject:  Re: BWRPG Questions - Default Properties error

Thanks, EVERYTHING (Including my custom code) works now, but during compiling the defaults, it throws some 60 errors.

I've fixed most of them, however in the BC_WeaponInfoCache File, I get these strange errors

Default Properties (BC_WeaponInfoCache): Error: ObjectProperty BWExpandedV3_Test.BC_WeaponInfoCache.WeaponInfo.SmallIconMaterial: unresolved reference to 'Texture'PostalChainsawSkins.Misc.ChainsawIcon',SmallIconCoords=(X2=127,Y2=31),InventoryGroup=1,BigIconMaterial=Texture'PostalChainsawSkins.Misc.ChainsawIcon',BWInventoryGroup=1,bIsBW=True)'

Error: Weapons::ImportText failed in: (ClassName="BWBPRecolors.A73BSkrithRifle",ItemName="A73-E Skrith Rifle",SmallIconMaterial=Texture'BallisticRecolors.A73b.SmallIcon_A73B',SmallIconCoords=(X2=127,Y2=31),InventoryGroup=5,BigIconMaterial=Texture'BallisticRecolors.A73b.BigIcon_A73B',BWInventoryGroup=5,bIsBW=True)

Should I just delete these, or is there something that I did wrong?

Author:  Captain Xavious [ Thu Sep 25, 2008 7:52 am ]
Post subject:  Re: BWRPG Questions - Default Properties error

Oh, yeah, delete the chainsaw ones, those are way old. I can get you a newer version if you want.

I imagine you can delete the ones from Sgt. Kelly's BWBPRecoulours too. It'll probably be remade when necessary any ways.

Author:  QuadraxisMk2 [ Thu Sep 25, 2008 7:55 am ]
Post subject:  Re: BWRPG Questions - Default Properties error

That would be nice, except there's a bunch more errors like these two that try to reference weapons that DONT EXIST. D:

(Sure, Ill take the chainsaw. >:D)

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/