Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ScriptWarnings spam the log-file in DM-Remorc-se.unr (Read 2506 times)
CodeX
YaBB Newbies
*
Offline



Posts: 9
Location: Deutschland
Joined: Jan 8th, 2015
Gender: Male
ScriptWarnings spam the log-file in DM-Remorc-se.unr
Mar 24th, 2015 at 6:44pm
Print Post  
Hi Helen,

just noticed the many warnings in my log-file while playing DM-Remorc-se.unr on the mountain.
Code
Select All
ScriptWarning: ParticleSpawner DM-Remorc-se.ParticleSpawner6 (Function DM-Remorc-se.ParticleSpawner.Timer:0085) Attempt to assigned variable through None
ScriptWarning: ParticleSpawner DM-Remorc-se.ParticleSpawner6 (Function DM-Remorc-se.ParticleSpawner.Timer:0091) Accessed None
(they repeat many times)  



Apparently the particles cannot spawn in the walls. The author of the mod knew this and wrote it in the header.
He also mentioned slow downs, but I only have them if the game console is active.
Next time you make an upgrade to the map, you may want to fix this by moving the ParticleSpawner away from the walls or by modifying the script.
I have done the latter already and it prevents the warnings. For this I added two lines of code to the Timer() function and moved another one more to the top.

old
Code
Select All
simulated function Timer()
{
	if(bInline)
		p = Spawn(class'PSParticle',,,Location+Vector(Rotation)*FRand() * ParticleSpawnRadius);
	else
		{
		NewLoc = VRand() * ParticleSpawnRadius + Location;
		NewLoc.z = Location.z;
		p = Spawn(class'PSParticle',,,NewLoc);
		}

	p.Texture = ParticleTexture;
	p.DrawScale = RandRange(ParticleSizeMin, ParticleSizeMax);
	p.PLife = RandRange(ParticleLifeSpanMin, ParticleLifeSpanMax);
	p.Acceleration.z = RandRange(ParticleSpeedMin, ParticleSpeedMax);
	if(ParticleLightType != LT_None)
	{
		p.LightEffect = ParticleLightEffect;
		p.LightType = ParticleLightType;
		p.LightBrightness = ParticleLightBrightness;
		p.LightHue = ParticleLightHue;
		p.LightSaturation = ParticleLightSaturation;
		p.LightRadius = ParticleLightRadius;
	}
	SetTimer( RandRange(ParticleDelayMin,ParticleDelayMin) , False );
}  



new
Code
Select All
simulated function Timer()
{
	if(bInline)
		p = Spawn(class'PSParticle',,,Location+Vector(Rotation)*FRand() * ParticleSpawnRadius);
	else
		{
		NewLoc = VRand() * ParticleSpawnRadius + Location;
		NewLoc.z = Location.z;
		p = Spawn(class'PSParticle',,,NewLoc);
		}

	SetTimer(RandRange(ParticleDelayMin,ParticleDelayMin) , False );

	if ( p == None )
	return;

	p.Texture = ParticleTexture;
	p.DrawScale = RandRange(ParticleSizeMin, ParticleSizeMax);
	p.PLife = RandRange(ParticleLifeSpanMin, ParticleLifeSpanMax);
	p.Acceleration.z = RandRange(ParticleSpeedMin, ParticleSpeedMax);
	if(ParticleLightType != LT_None)
	{
		p.LightEffect = ParticleLightEffect;
		p.LightType = ParticleLightType;
		p.LightBrightness = ParticleLightBrightness;
		p.LightHue = ParticleLightHue;
		p.LightSaturation = ParticleLightSaturation;
		p.LightRadius = ParticleLightRadius;
	}
}  




  
Back to top
 
IP Logged
 
Helen
YaBB Administrator
*****
Offline


hello

Posts: 1595
Location: earth
Joined: Nov 8th, 2005
Gender: Male
Re: ScriptWarnings spam the log-file in DM-Remorc-se.unr
Reply #1 - Mar 24th, 2015 at 9:22pm
Print Post  
Awesome job, I love all peeps who enjoy fixing UT code!
  

One of the Scriveners.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint