DayZ 1.8.0.3. Toggle on Debug causing in game issues. In Search of new way to toggle!

Yea i apologize for the ambiguity it was quite late when i wrote that. Is it possible the format of my debug monitor is incorrect? I dont see any errors in my RPT so im a bit stumped. Ill play around with it some more tonight after work.
 
the RPT will only report errors of syntax. If the F10 key doesn't work and there are no errors then its a logic error. The difference is that a logic error is written correctly so produces no errors.
Such as
if (variable == 3) then {
compares variable to 3 and executes the code if its true.
if (variable = 3) then {
is the assignement operator. it assigns the value of 3 to the variable. This would occur every time regardless of what you set variable to because you are assigning it 3 in the statement. this will not produce an error but obviously will fail almost all the time.

What you probably have is a logic condition which never evalutes correctly to display the debug monitor, but its a correctly written logic error so it produces no errors in the RPT.
 
the RPT will only report errors of syntax. If the F10 key doesn't work and there are no errors then its a logic error. The difference is that a logic error is written correctly so produces no errors.
Such as
if (variable == 3) then {
compares variable to 3 and executes the code if its true.
if (variable = 3) then {
is the assignement operator. it assigns the value of 3 to the variable. This would occur every time regardless of what you set variable to because you are assigning it 3 in the statement. this will not produce an error but obviously will fail almost all the time.

What you probably have is a logic condition which never evalutes correctly to display the debug monitor, but its a correctly written logic error so it produces no errors in the RPT.
Ok this makes more sense to me, thank you for explaining it. This is how I have it written, Im trying to figure this out rather than just cheating and copy/pasting that which you have provided.

I slapped the _dikCode in at the bottom of the dayz_spaceInterrupt.sqf
Code:
// numpad 5 0x4C now space 0x39
if (_dikCode == 0x39 or (_dikCode in actionKeys "User19")) then {
    DZE_5 = true;
};
 
 
if (_dikCode == 0x57 ) then {
    if (debugmonitor) then {
        debugmonitor = false;
        hintsilent "";
        }
    else {
        [] execVM "custom\WICKED_monitor.sqf";
        };
 
};
 
_handled

like so (going for F11 instead of F10) I have the monitor in a folder called custom in the root of my missions folder.

Here is the debug.
Code:
waitUntil {alive player};
 
 
    debugMonitor = true;
    while {debugMonitor} do {
 
     _killsH =         player getVariable["humanKills",0];
    _killsB =         player getVariable["banditKills",0];
    _humanity =     player getVariable["humanity",0];
    _clientfps =round diag_fps;
    _tL = ((14280 - time) / 60);
    _tL = round(_tL);
    hintSilent parseText format ["
    <t size='2'font='Bitstream'align='center'color='#660000'>W.I.C.K.E.D.</t><br/>
    <t size='1'font='Bitstream'align='left'color='#CC0000'>Blood:</t><t size='1' font='Bitstream'align='right'color='#CC0000'>%1</t><br/>
    <t size='1'font='Bitstream'align='left'color='#0066FF'>Humanity:</t><t size='1'font='Bitstream'align='right'color='#0066FF'>%2</t><br/>
    <t size='1'font='Bitstream'align='left'color='#FF9900'>Murders:</t><t size='1'font='Bitstream'align='right'color='#FF9900'>%3</t><br/>
    <t size='1'font='Bitstream'align='left'color='#666666'>Bandits Killed:</t><t size='1'font='Bitstream'align='right'color='#666666'>%4</t><br/>
    <t size='1'font='Bitstream'align='left'color='#00CC33'>Survived:</t><t size='1'font='Bitstream'align='right'color='#00CC33'>%5 Days</t><br/>
    <t size='1'font='Bitstream'align='left'color='#FFFFFF'>FPS:</t><t size='1'font='Bitstream'align='right'color='#FFCC00'>%6</t><br/>
    <t size='1'font='Bitstream'align='left'color='#FFFFFF'>Time until restart:</t><t size='0.75'font='Bitstream'align='right' color='#FFCC00'>%7mins</t><br/>
    <t size='1'font='Bitstream'align='left'color='#FFFFFF'>Vehicles:</t><t size='0.80'font='Bitstream'align='right'color='#FFCC00'>%8</t><br/>
    <t size='1.5'font='Bitstream'align='center'color='#006600'>%9</t><br/>
    <t size='1'font='Bitstream'align='center' color='#104E8B' >Press F11 to toggle! </t><br/>
    ",r_player_blood,round _humanity,_killsH,_killsB,dayz_Survived,(_clientfps),(_tL),(count([6800, 9200, 0] nearEntities [["Car","Motorcycle","Tank","Air","Ship"],25000])),dayz_playerName];
sleep 1;
};

Is the problem the fact that the monitor is called "debugMonitor" instead of "debugmonitor" ???
Im asking more because this isn't my server to screw around with. I will be testing my theory though.

-Edit- Nope, the capital letter M changed to lower case m in debugmonitor didn't fix it lol.. back to the drawing board!
 
Last edited:
Well that had better work because it looks right.
Capitalization doesnt matter except when using a select CASE: statement (i was wrong once before though)
 
Well that had better work because it looks right.
Capitalization doesnt matter except when using a select CASE: statement (i was wrong once before though)
yea still not working... Im a bit stumped..

Have you checked out the players_stats.sqf - I think that's the name- that controls the default debug monitor built into epoch at all? Insert activates it... I tried replacing that with my own, and then telling the dayz_spaceInterrupt.sqf to look there so insert would toggle my debug instead of the default but it didn't work.
 
No I didn't fool with it. how about disabling the antihacks.
I unfortunately can't do that cause I don't have access to the server PBO , but I can say I have this exact same debug monitor working on my vanilla dayz server which is using the exact same version of the same antihack. I guess I'll have another look at the player_stats.sqf since I wasn't the one who did it the first time.
 
so YOURS is working, but this one isnt'?
correct. Mine on vanilla dayz works fine. Of course its all called in the compiles.sqf. This one on his server doesn't work (epoch mod).

Only difference between the 2, other than where they're located is
Code:
if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};    <------ this bit here
        };

and in the actual debug bit
Code:
fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
at the top and
Code:
[] spawn fnc_debug;
   
};
at the bottom.. which Im sure is only different because the debug monitor code is in the compiles.sqf and not its own file
 
Last edited:
Funny, just booted up a brand new local server from pwnzor's 1.8.0.3 files and added the same code and still no debug monitor.

I just dont get it.
I couldn't get this to work on my buddies epoch server but it works fine on my server. Maybe a slight error in the way you're adding it? Paste the debug monitor you're using.
 
Just an update I did manage to get a toggle debug monitor working on my buddies epoch server. It only worked for me if I changed the calls in dayz_spaceInterrupt.sqf to look for the custom playerstats.sqf.. then edited the playerstats.sqf to my custom debug monitor. Insert toggles it.
 
Finally got it to work! Did not realize I had to copy the compiles.sqf to my missions folder and call for it in init.sqf..
I'm pretty much a noob at this but I'm getting there. Thanks for being so helpful!
Also realized that if the server is under heavy load the restart timer falls behind with a couple of minutes. I'm removing that part.

This is a picture of the monitor. toggleable with Insert:

debug_nice.jpg
 
Last edited:
Back
Top