Jump to content
  • 0

Client RPT spam fn_surfacenoise


Pro_Speedy

Question

Hi, 

 

got some spam in my client RPT

 

the error is

 

  Error Zero divisor
File z\addons\dayz_code\compile\fn_surfaceNoise.sqf, line 15
Error in expression <undEnvironExt" >> _soundType) select 0) select 3)];
if (_soundVal == 0) then {

 

any ideas what the problem is and how to fix it?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0
9 minutes ago, seelenapparat said:

you running jsrs on the server? if yes, thats where the errore comes from.

Im not sure its fixable.

yes i just figured it out, i don't think it's a server problem though maybe it's because i switched the launch options for my game around

Link to comment
Share on other sites

  • 0

Use this fn_surfaceNoise.sqf if you are running JSRS and viola, no more client spam :)

//Assess Terrain
private ["_unit","_pos","_type","_typeA","_soundType","_soundVal","_array"];
_unit = 	_this;
_pos = 		getPosATL _unit;
_type = 	surfaceType _pos;
_typeA = 	toArray _type;
_typeA 		set [,"DEL"];
_typeA = 	_typeA - ["DEL"];
_type = 	toString _typeA;

_soundType = 	getText (configFile >> "CfgSurfaces" >> _type >> "soundEnviron");
if((typeName ((getArray (configFile >> "CfgVehicles" >> "CAManBase" >> "SoundEnvironExt" >> _soundType) select ) select 1)) == "ARRAY") then{
	// JSRS present, setting static Val of 25
	_soundVal = 25;
} else {
	// No JSRS present, grabbing configvalue
	_soundVal =	parseNumber format["%1",((getArray (configFile >> "CfgVehicles" >> "CAManBase" >> "SoundEnvironExt" >> _soundType) select ) select 3)];
	if (_soundVal == ) then {
		_soundVal = 25;
	};
};
_array = [_soundType,_soundVal];
_array

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...