pbs with log : help please ;(

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Sg_Jack

New Member
Nov 12, 2001
12
0
0
www.unrealism.com
Hi,

I have a problem with my Mod's codes. We are working on an upcoming mod called Atlantis. The codes work well, but when i look at the log file, i have some warnings. The first problem occur with the postrender function i have in my weapon class. I write on the screen infos like current accuracy and firemod. But if i look at the log file, i get :

"..sgplayer0(function Atlantis.ATFireArms.postrender:000E) Accessed Array out of bounds (10/10)"

Do you know what it is refer to ? Here is my postrender function :

simulated function PostRender( canvas Canvas )
{
local PlayerPawn P;

MFTexture = MuzzleFlashVariations[(10)];

Super.PostRender(Canvas);
P = PlayerPawn(Owner);
if (P != None)
{

Super.PostRender(Canvas);
Canvas.SetPos(0.11 * Canvas.ClipX , 0.92 * Canvas.ClipY);
Canvas.Style = ERenderStyle.STY_Translucent;
Canvas.Font = Canvas.SmallFont;

Canvas.DrawColor.R = 0;
Canvas.DrawColor.G = 255;
Canvas.DrawColor.B = 0;
Canvas.DrawText(FireModeMessage);
}

if (P != None)
{

Super.PostRender(Canvas);
Canvas.SetPos(0.11 * Canvas.ClipX , 0.90 * Canvas.ClipY);
Canvas.Style = ERenderStyle.STY_Translucent;
Canvas.Font = Canvas.SmallFont;

Canvas.DrawColor.R = 0;
Canvas.DrawColor.G = 255;
Canvas.DrawColor.B = 0;
Canvas.DrawText("Accuracy: "$WeaponAccuracy);
}
}

To my mind, there is no errors, but i don't know anything with log... Also, i get another error (when i don't compile this part of code) with my player class. I don't know too what is the problem since i have only exec funstions... Here is what i get :

"...sgplayer0(function engine.playerpawn.playerwalking.processMove:00B5) GetAnimGroup = no mesh"

Is anybody know what it is ??? You would hep me a lot if you could find the problem :) Thx


Jack Oneill
Atlantis Leader
www.unrealism.com/modstargate
 

Raeled

Feuer Frei!
Jul 1, 2001
161
0
0
40
Dordrecht, The Netherlands
Visit site
1st error: i think the array you have called MuzzleFlashVariations has no 10th item

if you added it like this:

var texture MuzzleFlashVariations[10];

this means you will get an array with textures numbered from 0 to 9.

for the 2nd one
the playerclass asks for info about the animation, while there is no mesh (mesh=None)
 

2COOL4-U

New Member
Mar 17, 2001
505
0
0
37
dot NL
2cool.free.fr
Getting an array out of bound warning means that you were trying to access a value of the array that does not exist

for example you have an array with 10 parts, and you try to access the 11th you will get a warning in your log.

MFTexture = MuzzleFlashVariations[(10)];
This one is the problem maker I think

Btw why do you use [(10)] instead of [10]? I never saw someone using [(10)] before in my entire coding career. UnrealScript doens't complain about it(I could compile).
 

Sg_Jack

New Member
Nov 12, 2001
12
0
0
www.unrealism.com
thanks a lot :)

Well, thanks for this infos. I'll see if it delete the problem.

By the way, i don't know why i put [(10)] ! It must be an error of write ! I hope it will work like that :)

Also, i think it have find out the second problem, but i don't know how to fix it.... It refers to my player class. If i change the viewport to behindview (behindveiw 1), i see no models... Nevertheless, i put in defaultproperties the default models of UT...

Here is my code :

defaultproperties
{
Deaths(0)=Sound'Botpack.MaleSounds.(All).deathc1'
Deaths(1)=Sound'Botpack.MaleSounds.(All).deathc51'
Deaths(2)=Sound'Botpack.MaleSounds.(All).deathc3'
Deaths(3)=Sound'Botpack.MaleSounds.(All).deathc4'
Deaths(4)=Sound'Botpack.MaleSounds.(All).deathc53'
Deaths(5)=Sound'Botpack.MaleSounds.(All).deathc53'
drown=Sound'Botpack.MaleSounds.(All).drownM02'
breathagain=Sound'Botpack.MaleSounds.(All).gasp02'
HitSound3=Sound'Botpack.MaleSounds.(All).injurM04'
HitSound4=Sound'Botpack.MaleSounds.(All).injurH5'
GaspSound=Sound'Botpack.MaleSounds.(All).hgasp1'
UWHit1=Sound'Botpack.MaleSounds.(All).UWinjur41'
UWHit2=Sound'Botpack.MaleSounds.(All).UWinjur42'
LandGrunt=Sound'Botpack.MaleSounds.(All).land01'
VoicePackMetaClass="BotPack.VoiceMale"
CarcassType=Class'Botpack.TMale1Carcass'
JumpSound=Sound'Botpack.MaleSounds.(All).jump1'
HitSound1=Sound'Botpack.MaleSounds.(All).injurL2'
HitSound2=Sound'Botpack.MaleSounds.(All).injurL04'
Die=Sound'Botpack.MaleSounds.(All).deathc1'
VoiceType="BotPack.VoiceMaleTwo"
Mesh=LodMesh'Botpack.Commando'
}

It is a subclass of my SgPlayer. I don't know why it don't works... If you have an idea :) Thx
 

aspie

It's all good baby.
Feb 24, 2001
315
0
0
40
Australia
But is your player class a direct subclass of Tournament Player (which has no mesh) or from TMale1 (or something equivalent which does have a mesh).
 

Sg_Jack

New Member
Nov 12, 2001
12
0
0
www.unrealism.com
My player class is a subclass of Tournament Player. But i refer it to the commando mesh... The problem is that i get no skins.. I have a commando male mesh, but without skin !

And i still have this "no mesh" warning in the log...
 
Oh, by the way, I know this is about as unimportant as anything can get, but [(10)] is exactly the same as [10] since just about any language will handle the ( ) as a method for grouping something... so (10) = 10 just like (10+10) = 10+10 = 20 and just like (10*2)+10=10*2+10=30... get it? I myself often use ( ) in places where it's not needed simply to make my code easier to read.

Eater.