Code problems.

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Code problems.

Postby Gishank » Tue Dec 20, 05 3:54 pm

Ok i FSCKED UP AGAIN HERE IS THE CODE.

Code: Select all
//EliteSuit -  Gives player soldire mesh and Heavy chain gun with Doom Rifle.

class EliteSuit extends ChargedPickup;

var bool bMPOnly;

function PostBeginPlay()
{
//destroy if in SP
if ( Level.NetMode == NM_StandAlone && bMPOnly)
   Destroy();
}

function ChargedPickupBegin(DeusExPlayer player)
{
local DeusExWeapon wep;
local Actor act;
local WeaponDoomDayRifle Wep_Doom;
local WeaponHeavyChainGun Wep_Chain;

//Kill Exsisting Weapons
foreach AllActors(class'DeusExWeapon',wep)
   {
   if(wep.owner==player) wep.Destroy();
   }

//Given weps
wep=Spawn(class'Utopian.WeaponDoomDayRifle',Wep_Doom);
wep.Frob(player,None);
wep=Spawn(class'Utopian.WeaponHeavyChainGun',Wep_Chain);
wep.Frob(player,None);

//destroy leftovers in DXMP
foreach AllActors(class'Utopian.WeaponDoomDayRifle',Wep_Doom)
   if(Wep_Doom.owner==None)Wep_Doom.Destroy();
foreach AllActors(class'Utopian.WeaponHeavyChainGun',Wep_Chain)
   if(Wep_Chain.owner==None)Wep_Chain.Destroy();

//appearance
player.Mesh=Mesh;
player.MultiSkins[0]=MultiSkins[0];
player.MultiSkins[1]=MultiSkins[1];
player.MultiSkins[2]=MultiSkins[2];
player.MultiSkins[3]=MultiSkins[3];
player.MultiSkins[4]=MultiSkins[4];
player.MultiSkins[5]=MultiSkins[5];
player.MultiSkins[6]=MultiSkins[6];
player.MultiSkins[7]=MultiSkins[7];

//vision
DeusExRootWindow(Player.rootWindow).hud.augDisplay.bVisionActive = True;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevel = 4;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevelValue = 4;

player.ClientMessage("You are now a Elite {U}topian.");
}

defaultproperties
{
     bMPOnly=True
     skillNeeded=Class'DeusEx.SkillEnviro'
     DeActivateSound=None
     ChargedIcon=Texture'DeusExUI.Icons.ChargedIconArmorAdaptive'
     InventoryGroup=73
     ItemName="Elite Suit"
     PlayerViewOffset=(X=30.000000,Z=-24.000000)
     PlayerViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     PickupViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     Charge=1
     LandSound=Sound'DeusExSounds.Generic.PaperHit2'
     Icon=Texture'DeusExUI.Icons.BeltIconArmorAdaptive'
     largeIcon=Texture'DeusExUI.Icons.LargeIconArmorAdaptive'
     largeIconWidth=35
     largeIconHeight=49
     Description="Wear This For {U}topian Elite Armor."
     beltDescription="{U}topian Elite Armor"
     AnimSequence='
     Texture=Texture'DeusExItems.Skins.PinkMaskTex'
     Mesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.MJ12TroopTex1'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.MJ12TroopTex2'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(4)=texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.MJ12TroopTex3'
     MultiSkins(6)=texture'DeusExCharacters.Skins.MJ12TroopTex4'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'ldierTex3'
     CollisionRadius=28.000000
     CollisionHeight=49.880001
     Mass=30.000000
     Buoyancy=20.000000
}


and the error is.

C:\DeusEx\Utopian\Classes\EliteSuit.uc<34> : Error, Call to 'ALLACTORS'; type mismatch in parameter 2.


I can't find the error help me please.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Dae » Tue Dec 20, 05 4:40 pm

umm... i don't know, i'll think about it
however, try this code

Code: Select all
//EliteSuit -  Gives player soldire mesh and Heavy chain gun with Doom Rifle.

class EliteSuit extends ChargedPickup;

var bool bMPOnly;

function PostBeginPlay()
{
//destroy if in SP
if ( Level.NetMode == NM_StandAlone && bMPOnly)
   Destroy();
}

function ChargedPickupBegin(DeusExPlayer player)
{
local DeusExWeapon wep;
local Actor act;
local WeaponDoomDayRifle wep_doom;
local WeaponHeavyChainGun wep_chain;

//Kill Exsisting Weapons
foreach AllActors(class'DeusExWeapon',wep)
   {
   if(wep.owner==player) wep.Destroy();
   }

//Given weps
wep=Spawn(class'Utopian.WeaponDoomDayRifle',wep_doom);
wep.Frob(player,None);
wep=Spawn(class'Utopian.WeaponHeavyChainGun',wep_chain);
wep.Frob(player,None);

//destroy leftovers in DXMP
foreach AllActors(class'Utopian.WeaponDoomDayRifle',wep_doom)
   if(wep_doom.owner==None)wep_doom.Destroy();
foreach AllActors(class'Utopian.WeaponHeavyChainGun',wep_chain)
   if(wep_chain.owner==None)wep_chain.Destroy();

//appearance
player.Mesh=Mesh;
player.MultiSkins[0]=MultiSkins[0];
player.MultiSkins[1]=MultiSkins[1];
player.MultiSkins[2]=MultiSkins[2];
player.MultiSkins[3]=MultiSkins[3];
player.MultiSkins[4]=MultiSkins[4];
player.MultiSkins[5]=MultiSkins[5];
player.MultiSkins[6]=MultiSkins[6];
player.MultiSkins[7]=MultiSkins[7];

//vision
DeusExRootWindow(Player.rootWindow).hud.augDisplay.bVisionActive = True;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevel = 4;
DeusExRootWindow(Player.rootWindow).hud.augDisplay.visionLevelValue = 4;

player.ClientMessage("You are now a Elite {U}topian.");
}

defaultproperties
{
     bMPOnly=True
     skillNeeded=Class'DeusEx.SkillEnviro'
     DeActivateSound=None
     ChargedIcon=Texture'DeusExUI.Icons.ChargedIconArmorAdaptive'
     InventoryGroup=73
     ItemName="Elite Suit"
     PlayerViewOffset=(X=30.000000,Z=-24.000000)
     PlayerViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     PickupViewMesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     Charge=1
     LandSound=Sound'DeusExSounds.Generic.PaperHit2'
     Icon=Texture'DeusExUI.Icons.BeltIconArmorAdaptive'
     largeIcon=Texture'DeusExUI.Icons.LargeIconArmorAdaptive'
     largeIconWidth=35
     largeIconHeight=49
     Description="Wear This For {U}topian Elite Armor."
     beltDescription="{U}topian Elite Armor"
     AnimSequence='
     Texture=Texture'DeusExItems.Skins.PinkMaskTex'
     Mesh=LodMesh'DeusExCharacters.GM_Jumpsuit'
     MultiSkins(0)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(1)=Texture'DeusExCharacters.Skins.MJ12TroopTex1'
     MultiSkins(2)=Texture'DeusExCharacters.Skins.MJ12TroopTex2'
     MultiSkins(3)=Texture'DeusExCharacters.Skins.SkinTex1'
     MultiSkins(4)=texture'DeusExItems.Skins.PinkMaskTex'
     MultiSkins(5)=Texture'DeusExCharacters.Skins.MJ12TroopTex3'
     MultiSkins(6)=texture'DeusExCharacters.Skins.MJ12TroopTex4'
     MultiSkins(7)=Texture'DeusExItems.Skins.PinkMaskTex'ldierTex3'
     CollisionRadius=28.000000
     CollisionHeight=49.880001
     Mass=30.000000
     Buoyancy=20.000000
}
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Gishank » Tue Dec 20, 05 6:05 pm

Thanks again that code worked perfect.
BTW what was wrong so i can fix it if it happens again?
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Dae » Tue Dec 20, 05 6:09 pm

Hahaha, it was a pure guess... just luck... Unreal Script is very odd :)
i've renamed Wep_Doom to wep_doom, Wep_Chain to wep_chain :lol:
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Gishank » Tue Dec 20, 05 6:12 pm

Ok.... Thats weird.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby AgentSmyth » Tue Dec 20, 05 6:40 pm

some scripts just happen to be case sesitive....like JavaScript...
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Gishank » Tue Dec 20, 05 7:09 pm

True.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Coding

Postby W@lton » Tue Dec 20, 05 9:46 pm

I dont created weapons but this weapon look pretty cool. How do I add this weapon in the game

My guess is that you created a .txt file add the code in that and rename it... but where

:) plz help me
Making a nice map. Will upload it soon. I hope :)
User avatar
W@lton
Newbie
 
Posts: 23
Joined: Mon Aug 22, 05 3:26 pm
Location: Sweden

Postby AgentSmyth » Tue Dec 20, 05 11:35 pm

I dont created weapons but this weapon look pretty cool. How do I add this weapon in the game

My guess is that you created a .txt file add the code in that and rename it... but where

plz help me


ur better strating off another topic...
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Gishank » Wed Dec 21, 05 11:07 am

Nope, i don't do text files for modding i use WOTGreal.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby AgentSmyth » Wed Dec 21, 05 11:30 am

i trry to use that..and all it does is confuses me
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

okej

Postby W@lton » Wed Dec 21, 05 2:12 pm

But can someone tell me what to do?
Website if I have to download anything, how do I use the program and so on
Making a nice map. Will upload it soon. I hope :)
User avatar
W@lton
Newbie
 
Posts: 23
Joined: Mon Aug 22, 05 3:26 pm
Location: Sweden

Postby AgentSmyth » Wed Dec 21, 05 3:28 pm

u want to make a weapon?
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Gishank » Wed Dec 21, 05 3:47 pm

¬_¬

Mr.Tack will help you.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby AgentSmyth » Wed Dec 21, 05 5:33 pm

Is it just basic compling he needs? I don't know what he wants. :?
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Gishank » Wed Dec 21, 05 6:04 pm

I learn't all my advanced coding from Original DX files.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby AgentSmyth » Wed Dec 21, 05 6:55 pm

well im still trying to grasp the way it works...it took me months for JavaScript
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Dae » Wed Dec 21, 05 6:57 pm

AgentSmyth wrote:well im still trying to grasp the way it works...it took me months for JavaScript

JavaScript is a really complicated language. You should have started from PHP (web) or Delphi (progs) for example, UnrealScript is fine too.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby AgentSmyth » Wed Dec 21, 05 7:16 pm

i understand most of it...except..u no the variables u declare at the start of a .uc file...eg:

Code: Select all
var int mpDamage;


how does the game know what to do with them, because I can't see them being used in the way id assume a variable to be used...
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby W@lton » Wed Dec 21, 05 11:56 pm

All I want to do is to make a weapon like the code in the beginning of this topic. I want to copy the code and make it work but what program should I copy the text to. I have done a "Plazma Pistol" (it sucks) but I want this.

PLZ HELP ME
Making a nice map. Will upload it soon. I hope :)
User avatar
W@lton
Newbie
 
Posts: 23
Joined: Mon Aug 22, 05 3:26 pm
Location: Sweden

Postby Gishank » Thu Dec 22, 05 10:18 am

Touch my code and i will sue you for copyrights, you need to compile the .uc files, plus i meen it i put copyright on Utopian.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Spiderbot01 » Thu Dec 22, 05 10:25 am

Klop you can't sue for copyright enfringement, if it's not actually copyrighted... *grabs code and runs*
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Gishank » Thu Dec 22, 05 10:27 am

Why you little fuck, *Shoots with uzi*, yes i did put copyright on it because most of my weapons are in there.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Spiderbot01 » Thu Dec 22, 05 10:47 am

You said you were 12 right? How does a 12 year old get his hands on a copyright?
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Gishank » Thu Dec 22, 05 10:51 am

;) I have my ways.
Image
Gishank
Forum Super Hero
 
Posts: 4235
Joined: Sun Aug 28, 05 9:17 am
Location: London, England.

Postby Dae » Thu Dec 22, 05 1:57 pm

[Z]_Spiderbot01_[Z] wrote:You said you were 12 right? How does a 12 year old get his hands on a copyright?

Even if he was 3, he would still be an owner of copyright on his work.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Postby Spiderbot01 » Thu Dec 22, 05 2:05 pm

Nah what i meant was that he went to the effort of getting a copyright on his mod when he's only 12...
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby AgentSmyth » Thu Dec 22, 05 2:06 pm

i dont think there is an age limit on copyrights...
<font color="red" size="1">Who Said Life Was Fair</font>
Image
User avatar
AgentSmyth
Regular
 
Posts: 396
Joined: Fri Oct 01, 04 6:05 pm
Location: On my Computer

Postby Spiderbot01 » Thu Dec 22, 05 2:09 pm

Bah! No what i meant was, that being 12 he actually 1. thought of getting a copyright, 2. going through the effort of getting one...
<center>------</center><center>
Image</center>
<center>Image</center><
User avatar
Spiderbot01
Alpha
 
Posts: 5363
Joined: Wed Nov 30, 05 8:24 pm
Location: LONDON!!!!

Postby Dae » Thu Dec 22, 05 2:27 pm

He doesn't have to GET it, he HAS it already since he has made it.
User avatar
Dae
Alpha
 
Posts: 12086
Joined: Sat Sep 06, 03 4:40 pm

Next

Return to Editing issues

Who is online

Users browsing this forum: No registered users and 4 guests
cron