Errors with debug

LTGNick

Valued Member!
Code:
while {debugMonitor} 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='1.5' font='Bitstream' align='center' color='#EDE275'>%1</t><br/>
        <br/>
    <t size='1' font='Bitstream'align='center'>DayZ LTG</t>
        <t size='1' font='Bitstream'align='center'>Hardcore Servers</t><br/>
        <br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Zombies Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%2</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Survivors Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%4</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Bandits Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%5</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>FPS: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%8</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Humanity: </t><t color='#5CB3FF' size='0.95' font='Bitstream' align='right'>%7</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Blood: </t><t color='#E41B17' size='0.95' font='Bitstream' align='right'>%6</t><br/>
        <br/>
    <t size='0.90' font='Bitstream'align='center'color='#FDD017'>Restart in %9 minutes!</t><br/>
    <t size='0.75' font='Bitstream' align='center' color='#FDD017'>Press INSERT to toggle</t>
        <br/>
    <img size='3' image='%10'/><br/>
    ",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
        (180-(round(serverTime/60))),
        _pic];
    sleep 1;
};

And then in RPT this error

Code:
21:39:17 Error in expression <ns\__cur_mp.chernarus\debug.sqf"
while {debugMonitor} do
{
_pic = (gettext (conf>
21:39:17   Error position: <debugMonitor} do
{
_pic = (gettext (conf>
21:39:17   Error Undefined variable in expression: debugmonitor
21:39:17 File mpmissions\__cur_mp.chernarus\debug.sqf, line 1

hmmm obvis its in the first like but what is it?
 
Replace your code with this:

Code:
    _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='1.5' font='Bitstream' align='center' color='#EDE275'>%1</t><br/>
        <br/>
    <t size='1' font='Bitstream'align='center'>DayZ LTG</t>
        <t size='1' font='Bitstream'align='center'>Hardcore Servers</t><br/>
        <br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Zombies Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%2</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Survivors Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%4</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Bandits Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%5</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>FPS: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%8</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Humanity: </t><t color='#5CB3FF' size='0.95' font='Bitstream' align='right'>%7</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Blood: </t><t color='#E41B17' size='0.95' font='Bitstream' align='right'>%6</t><br/>
        <br/>
    <t size='0.90' font='Bitstream'align='center'color='#FDD017'>Restart in %9 minutes!</t><br/>
    <t size='0.75' font='Bitstream' align='center' color='#FDD017'>Press INSERT to toggle</t>
        <br/>
    <img size='3' image='%10'/><br/>
    ",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
        (180-(round(serverTime/60))),
        _pic];
    sleep 1;
 
ok you need to define your variable debugMonitor somewhere, thats what you RPT is trying to tell you.
But anyway, why dont you just use j0k3r5 Debug-Monitor and make some changes there:
Hope he dont mind if i make there some changes :)

try this one Nick:
Code:
/*

    /////Tweaked j0k3r5 / Original work done by Matt L / and to anyone else that is involved that Ive forgotten////
    ////www.j0k3r5.com////
    If modified and released give credits where due, thank you.
  
*/


dayz_spaceInterrupt = {
    private ["_dikCode", "_handled"];
    _dikCode = _this select 1;
    _handled = false;
    if (_dikCode == 0x44) then { //change key here: 0x44=F11)
        if (j0k3r5_stats) then {
            j0k3r5_stats = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
    };
    _handled
};
fnc_debug = {
    j0k3r5_stats = true;
    while {j0k3r5_stats} 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='1.5' font='Bitstream' align='center' color='#EDE275'>%1</t><br/>
        <br/>
    <t size='1' font='Bitstream'align='center'>DayZ LTG</t>
        <t size='1' font='Bitstream'align='center'>Hardcore Servers</t><br/>
        <br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Zombies Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%2</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Survivors Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%4</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Bandits Killed: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%5</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>FPS: </t><t color='#FFFFFF' size='0.95' font='Bitstream' align='right'>%8</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Humanity: </t><t color='#5CB3FF' size='0.95' font='Bitstream' align='right'>%7</t><br/>
        <t color='#FDD017' size='0.95' font='Bitstream' align='left'>Blood: </t><t color='#E41B17' size='0.95' font='Bitstream' align='right'>%6</t><br/>
        <br/>
    <t size='0.90' font='Bitstream'align='center'color='#FDD017'>Restart in %9 minutes!</t><br/>
    <t size='0.75' font='Bitstream' align='center' color='#FDD017'>Press INSERT to toggle</t>
        <br/>
    <img size='3' image='%10'/><br/>
    ",
        (name player),
        (player getVariable['zombieKills', 0]),
        (player getVariable['headShots', 0]),
        (player getVariable['humanKills', 0]),
        (player getVariable['banditKills', 0]),
        (player getVariable['USEC_BloodQty', r_player_blood]),
        (player getVariable['humanity', 0]),
        (round diag_fps),
        (180-(round(serverTime/60))),
        _pic];
    sleep 1;
    };
};

[] spawn fnc_debug;

Call it in your init.sqf:

search for
Code:
if (!isDedicated) then {

and add right after:
Code:
    //Debug
    [] execVM "Path_to\debug_monitor.sqf";

Should be done ;)

You can change the toggle key by change this line:
Code:
  if (_dikCode == 0x44) then {
here you can find other keys you can use (now it is F11)
https://community.bistudio.com/wiki/DIK_KeyCodes

Credits goes to j0k3r5 :D
 
Back
Top