Raryin Posted October 28, 2014 Report Share Posted October 28, 2014 Hello, Trying to get Single Currency to work on my Epoch / Origins server (no Overwatch) and have run into some difficulties getting the wallet coins to work (bank seems to work fine). It seems that coins are not being stored on the player at all as shown here. (I've changed the HUD now and it no longer shows 'scalar' but I'm still getting the issue) Naturally this is very damaging to the system as I cannot buy anything at all from the traders! I'm using Soul's Hive fyi. My rpt file is being spammed with this error(s): Error Undefined variable in expression: _cashmoney File mpmissions\__CUR_MP.Tavi\addons\playerhud\playerHud.sqf, line 52 Error in expression <ReMixhud_blood, AsReMixhud_humanity, _cashMoney, AsReMixhud_zombiekills, AsRe> Error position: <_cashMoney, AsReMixhud_zombiekills, AsRe> Error Undefined variable in expression: _cashmoney File mpmissions\__CUR_MP.Tavi\addons\playerhud\playerHud.sqf, line 52 Error in expression <ReMixhud_blood, AsReMixhud_humanity, _cashMoney, AsReMixhud_zombiekills, AsRe> Error position: <_cashMoney, AsReMixhud_zombiekills, AsRe> Error Undefined variable in expression: _cashmoney Here is the file in question - it looks a little different from the default as I merged it with PeterBeer's HUD. I was still getting the problem with the HUD from Zupa's however. disableSerialization; // player setVariable["AsReMixhud", true];//Variable Show/Hide HUD Support for control player hud AsReMixhud_Control = true; // player getVariable["AsReMixhud",true]; while {true} do { 1000 cutRsc ["AsReMixhud","PLAIN"]; _wpui = uiNameSpace getVariable "AsReMixhud"; _vitals = _wpui displayCtrl 4900; _thePlayer = player; AsReMixhud_zombieKills = _thePlayer getVariable["zombieKills",0]; AsReMixhud_headshots = _thePlayer getVariable["headShots",0]; AsReMixhud_killsH = _thePlayer getVariable["humanKills",0]; _cashMoney = _thePlayer getVariable["cashMoney",0]; _bankMoney = _thePlayer getVariable["bankMoney",0]; AsReMixhud_killsB = _thePlayer getVariable["banditKills",0]; AsReMixhud_humanity = _thePlayer getVariable["humanity",0]; AsReMixhud_blood = ""; Fps = (round diag_fps); _stime = 0; if(serverTime > 36000)then{_stime = time;}else{_stime = serverTime;}; _hours = (_stime/60/60); _hours = toArray (str _hours); _hours resize 1; _hours = toString _hours; _hours = compile _hours; _hours = call _hours; _minutes = floor(_stime/60); _minutes2 = ((_minutes - (_hours*60)) min 60) max 0;if (_minutes2 < 10) then {_minutes2 = format ['0%1',_minutes2];}; if(AsReMixhud_humanity >= 5000) then { Humanity_Icon = "<img size='0.9' image='addons\playerhud\icons\HeroHumanity.paa'/>"; }; if((AsReMixhud_humanity >= 200) && (AsReMixhud_humanity <= 4999)) then { Humanity_Icon = "<img size='0.9' image='addons\playerhud\icons\CivHumanity.paa'/>"; }; if(AsReMixhud_humanity <= 199) then { Humanity_Icon = "<img size='0.9' image='addons\playerhud\icons\BanditHumanity.paa'/>"; }; _vitals ctrlSetStructuredText parseText format [" <t size='0.8' align='right'>~~~~~ Stats ~~~~~</t><br/> <t size='0.9'> %1 </t><img size='0.9' align='right' image='addons\playerhud\icons\Health.paa'/><br/> <t size='0.9'> %2 %3 </t><br/> <t size='0.9'> $%4 </t><img size='0.9' align='right' image='addons\playerhud\icons\Money.paa'/><br/> <t size='0.9'> $%5 </t><img size='0.9' align='right' image='addons\playerhud\icons\Bank.paa'/><br/> <t size='0.9'> %6 </t><img size='0.9' align='right' image='addons\playerhud\icons\HeroKills.paa'/><br/> <t size='0.9'> %7 </t><img size='0.9' align='right' image='addons\playerhud\icons\BanditKills.paa'/><br/> <t size='0.9'> %8 </t><img size='0.9' align='right' image='addons\playerhud\icons\ZombieKills.paa'/><br/> <t size='0.9'> %9h %10min </t><img size='0.9' align='right' image='addons\playerhud\icons\Uptime.paa'/><br/> <t size='0.9'> %11 </t><img size='0.9' align='right' image='addons\playerhud\icons\Fps.paa'/><br/> <t size='0.8' align='right'>~~~~~~~~~~~~~~~~~</t><br/>", AsReMixhud_blood, [AsReMixhud_humanity] call BIS_fnc_numberText, Humanity_Icon, [_cashMoney] call BIS_fnc_numberText, [_bankMoney] call BIS_fnc_numberText, AsReMixhud_killsH, AsReMixhud_killsB, AsReMixhud_zombiekills, _hours, _minutes2, Fps ]; _vitals ctrlCommit 0; sleep 2; }; Link to comment Share on other sites More sharing options...
A Pollo Posted October 28, 2014 Report Share Posted October 28, 2014 make sure that you are actually using the _cashMoney system and not the headShots system. Check your .sql database and see if you have a CashMoney column in your Character_data table. If not then you are using the headShots to count your money and you should change the code to this. disableSerialization; // player setVariable["AsReMixhud", true];//Variable Show/Hide HUD Support for control player hud AsReMixhud_Control = true; // player getVariable["AsReMixhud",true]; while {true} do { 1000 cutRsc ["AsReMixhud","PLAIN"]; _wpui = uiNameSpace getVariable "AsReMixhud"; _vitals = _wpui displayCtrl 4900; _thePlayer = player; AsReMixhud_zombieKills = _thePlayer getVariable["zombieKills",0]; //AsReMixhud_headshots = _thePlayer getVariable["headShots",0]; AsReMixhud_killsH = _thePlayer getVariable["humanKills",0]; _cashMoney = _thePlayer getVariable["headShots",0]; _bankMoney = _thePlayer getVariable["bankMoney",0]; AsReMixhud_killsB = _thePlayer getVariable["banditKills",0]; AsReMixhud_humanity = _thePlayer getVariable["humanity",0]; AsReMixhud_blood = ""; Fps = (round diag_fps); _stime = 0; if(serverTime > 36000)then{_stime = time;}else{_stime = serverTime;}; _hours = (_stime/60/60); _hours = toArray (str _hours); _hours resize 1; _hours = toString _hours; _hours = compile _hours; _hours = call _hours; _minutes = floor(_stime/60); _minutes2 = ((_minutes - (_hours*60)) min 60) max 0;if (_minutes2 < 10) then {_minutes2 = format ['0%1',_minutes2];}; if(AsReMixhud_humanity >= 5000) then { Humanity_Icon = "<img size='0.9' image='addons\playerhud\icons\HeroHumanity.paa'/>"; }; if((AsReMixhud_humanity >= 200) && (AsReMixhud_humanity <= 4999)) then { Humanity_Icon = "<img size='0.9' image='addons\playerhud\icons\CivHumanity.paa'/>"; }; if(AsReMixhud_humanity <= 199) then { Humanity_Icon = "<img size='0.9' image='addons\playerhud\icons\BanditHumanity.paa'/>"; }; _vitals ctrlSetStructuredText parseText format [" <t size='0.8' align='right'>~~~~~ Stats ~~~~~</t><br/> <t size='0.9'> %1 </t><img size='0.9' align='right' image='addons\playerhud\icons\Health.paa'/><br/> <t size='0.9'> %2 %3 </t><br/> <t size='0.9'> $%4 </t><img size='0.9' align='right' image='addons\playerhud\icons\Money.paa'/><br/> <t size='0.9'> $%5 </t><img size='0.9' align='right' image='addons\playerhud\icons\Bank.paa'/><br/> <t size='0.9'> %6 </t><img size='0.9' align='right' image='addons\playerhud\icons\HeroKills.paa'/><br/> <t size='0.9'> %7 </t><img size='0.9' align='right' image='addons\playerhud\icons\BanditKills.paa'/><br/> <t size='0.9'> %8 </t><img size='0.9' align='right' image='addons\playerhud\icons\ZombieKills.paa'/><br/> <t size='0.9'> %9h %10min </t><img size='0.9' align='right' image='addons\playerhud\icons\Uptime.paa'/><br/> <t size='0.9'> %11 </t><img size='0.9' align='right' image='addons\playerhud\icons\Fps.paa'/><br/> <t size='0.8' align='right'>~~~~~~~~~~~~~~~~~</t><br/>", AsReMixhud_blood, [AsReMixhud_humanity] call BIS_fnc_numberText, Humanity_Icon, [_cashMoney] call BIS_fnc_numberText, [_bankMoney] call BIS_fnc_numberText, AsReMixhud_killsH, AsReMixhud_killsB, AsReMixhud_zombiekills, _hours, _minutes2, Fps ]; _vitals ctrlCommit 0; sleep 2; }; Link to comment Share on other sites More sharing options...
Raryin Posted October 28, 2014 Author Report Share Posted October 28, 2014 I've stared at the database for a very long time and can't see anything wrong with it (I've definitely got a CashMoney column, but obviously all the fields are 0) Link to comment Share on other sites More sharing options...
SSG Posted October 28, 2014 Report Share Posted October 28, 2014 im having the same problem and when people sell thing nothing is given to them Link to comment Share on other sites More sharing options...