Jump to content
  • 0

Debug monitor Help


Brutus

Question

Hi all, here it's my debug monitor script:

if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = false;};
 
while {custom_monitor} do
{
    _kills        = player getVariable["zombieKills",0];
    _killsH    = player getVariable["humanKills",0];
    _killsB    = player getVariable["banditKills",0];
    _humanity    = player getVariable["humanity",0];
    _headShots =  player getVariable["headShots",0];
	 _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            if (player == vehicle player) then
            {
                _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
            }
                else
            {
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            };
    hintSilent parseText format ["
	<t size='2'font='Bitstream'align='center' color='#104E8B' >%1</t><br/>
    <t size='1.25'font='Bitstream'align='left'color='#104E8B'>Survie depuis:</t><t size='1'font='Bitstream'align='right'>%2 Jours</t><br/>
    <t size='1.25'font='Bitstream'align='left'color='#EE0000'>Santé:</t><t size='1.25' font='Bitstream'align='right'>%3</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ffcc00'>Humanité:</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ff0000'>Meurtres:</t><t size='1'font='Bitstream'align='right'>%5</t><br/>
    <t size='1'font='Bitstream'align='left'color='#16ba00'>Bandits tués:</t><t size='1'font='Bitstream'align='right'>%6</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ffcc00'>Zombies tués:</t><t size='1'font='Bitstream'align='right'>%7</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ffcc00'>Tir tête:</t><t size='1'font='Bitstream'align='right'>%8</t><br/>
	<t size='1'font='Bitstream'align='left'color='#ffcc00'>FPS:</t><t size='1'font='Bitstream'align='right'>%9</t><br/>
    <img size='3' image='%10'/><br/>	
    <t size='1.25'font='Bitstream'align='left'color='#104E8B'>Redémarrage:</t><t size='1'font='Bitstream'align='right'>%11 Minutes</t>
    ",dayz_playerName,(dayz_Survived),r_player_blood,(round(_humanity)),_killsH,_killsB,_kills,_headShots,floor(diag_fps),_pic,(round(360-(serverTime)/60))];
    sleep 1;
};

So far it working without any problem.

Since the new steam patch RTP get spamed with this alert:

13:22:17 Error in expression <eam'align='right'>%11 Minutes</t>
    ",dayz_playerName,(dayz_Survived),r_player>
13:22:17   Error position: <dayz_playerName,(dayz_Survived),r_player>
13:22:17   Error Undefined variable in expression: dayz_playername
13:22:17 File mpmissions\__cur_mp.Napf\custom\custom_monitor.sqf, line 31

Any help?

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

Thx mate, here it's the new alert now spamed rpt:

19:15:40 Error in expression <t'>%11 Minutes</t>
    ",(name player),(dayz_Survived),r_player_blood,(round(_hu>
19:15:40   Error position: <dayz_Survived),r_player_blood,(round(_hu>
19:15:40   Error Undefined variable in expression: dayz_survived
19:15:40 File mpmissions\__cur_mp.Napf\custom\custom_monitor.sqf, line 31
Link to comment
Share on other sites

  • 0

first:

debug monitor only needs to be executed client side, that means put the execvm "debugmonitor.sqf" in the "if(isDedicated) then" Area of your init.sqf.

As a result those errors wont show up in the server.rpt anymore, only in the client.rpt.

To get rid of the client.rpt errors you need to get rid of the predefinition of private variables and call the values directly like this:

if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = false;};
 
while {custom_monitor} do
{
	 _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            if (player == vehicle player) then
            {
                _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
            }
                else
            {
                _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
            };
    hintSilent parseText format ["
	<t size='2'font='Bitstream'align='center' color='#104E8B' >%1</t><br/>
    <t size='1.25'font='Bitstream'align='left'color='#104E8B'>Survie depuis:</t><t size='1'font='Bitstream'align='right'>%2 Jours</t><br/>
    <t size='1.25'font='Bitstream'align='left'color='#EE0000'>Santé:</t><t size='1.25' font='Bitstream'align='right'>%3</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ffcc00'>Humanité:</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ff0000'>Meurtres:</t><t size='1'font='Bitstream'align='right'>%5</t><br/>
    <t size='1'font='Bitstream'align='left'color='#16ba00'>Bandits tués:</t><t size='1'font='Bitstream'align='right'>%6</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ffcc00'>Zombies tués:</t><t size='1'font='Bitstream'align='right'>%7</t><br/>
    <t size='1'font='Bitstream'align='left'color='#ffcc00'>Tir tête:</t><t size='1'font='Bitstream'align='right'>%8</t><br/>
	<t size='1'font='Bitstream'align='left'color='#ffcc00'>FPS:</t><t size='1'font='Bitstream'align='right'>%9</t><br/>
    <img size='3' image='%10'/><br/>	
    <t size='1.25'font='Bitstream'align='left'color='#104E8B'>Redémarrage:</t><t size='1'font='Bitstream'align='right'>%11 Minutes</t>
    ",(name player),(dayz_Survived),round(r_player_blood),(round(player getVariable["humanity",0])),(player getVariable["humanKills",0]),(player getVariable["banditKills",0]),(player getVariable["zombieKills",0]),(player getVariable["headShots",0]),floor(diag_fps),_pic,(round(360-(serverTime)/60))];
    sleep 1;
};
Link to comment
Share on other sites

  • 0

Hi;

 

My custom monitor worked like a charm before the lastest steam update.

Anyway it's called from init trought client side mission.

 

I ll try your correction.

Thx for all.

 

Edit: anyway the custom monitor working 100% just getting this rtp spamed. I will tell tomorrow after next restart if it was fixed

Link to comment
Share on other sites

  • 0

Yes thank you i did the change and my custom monitor was ever called rightly, i'm  waiting for the restart to see if it still spamed rtp.

 

PS: the edit would say just with the older SQF posted in main topic i v got the debug working 100% just the rtp spamed

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...