Jump to content

Error Undefined variable in expression: _cashmoney


Recommended Posts

I installed Zupa's Single Currency Mod Version 1.1 on my server. Everything was working perfectly.

 

The HUD was showing up, it was counting Headshots as currency, and trader prices were working properly.

 

I proceeded to install Soul's Version 2.0 to my server.

 

Now, the HUD doesn't show up, and I cannot trade with the trader.

 

I get the following error in my RPT log.

7:24:12 Error in expression <object getVariable[(_variable + "_CHK"),_vNew];
_result = _vNew - _vOld;
_object>
7:24:12 Error position: <_vNew];
_result = _vNew - _vOld;
_object>
7:24:12 Error Undefined variable in expression: _vnew
7:24:12 File z\addons\dayz_server\init\server_functions.sqf, line 577
7:24:12 Error in expression <_killsH,_killsB,_currentModel,_humanity,_cashMoney];

_key call server_hiveWrite>
7:24:12 Error position: <_cashMoney];

_key call server_hiveWrite>
7:24:12 Error Undefined variable in expression: _cashmoney
7:24:12 File z\addons\dayz_server\compile\server_playerSync.sqf, line 193
7:24:12 Error in expression <object getVariable[(_variable + "_CHK"),_vNew];
_result = _vNew - _vOld;
_object>
7:24:12 Error position: <_vNew];
_result = _vNew - _vOld;
_object>
7:24:12 Error Undefined variable in expression: _vnew
7:24:12 File z\addons\dayz_server\init\server_functions.sqf, line 577
7:24:12 Error in expression <_killsH,_killsB,_currentModel,_humanity,_cashMoney];

_key call server_hiveWrite>
7:24:12 Error position: <_cashMoney];

_key call server_hiveWrite>
7:24:12 Error Undefined variable in expression: _cashmoney
7:24:12 File z\addons\dayz_server\compile\server_playerSync.sqf, line 193
7:25:06 "51 Active ground units"
7:25:06 "0 Active emplacement units"
7:25:06 "0 Active chopper patrol units (Crew)"
7:25:06 "0 Active vehicle patrol units (Crew)"
7:25:55 Error in expression <object getVariable[(_variable + "_CHK"),_vNew];
_result = _vNew - _vOld;
_object>
7:25:55 Error position: <_vNew];
_result = _vNew - _vOld;
_object>
7:25:55 Error Undefined variable in expression: _vnew
7:25:55 File z\addons\dayz_server\init\server_functions.sqf, line 577
7:25:55 Error in expression <_killsH,_killsB,_currentModel,_humanity,_cashMoney];

_key call server_hiveWrite>
7:25:55 Error position: <_cashMoney];

_key call server_hiveWrite>
7:25:55 Error Undefined variable in expression: _cashmoney
7:25:55 File z\addons\dayz_server\compile\server_playerSync.sqf, line 193

I have no errors in my hive log.

 

I can confirm that I have a "CashMoney" column in my "character_data" table in the database.

 

UPDATE: For reference, I'm using Vilayer and am having slight trouble overwriting the HiveExt.dll file which may be the problem.

 

Pastebins of files:

 

playerHud.sqf

server_functions.sqf

server_playedSetup.sqf

server_playerSync.sqf

 

Has anyone else experienced this problem before and does anyone have a solution?

 

All help is greatly appreciated.

 

Thanks,

 

Rick

Link to comment
Share on other sites

Too many commas in your playerHud.sqf. Should be like 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["cashMoney",0];
    _bankMoney 		=  _thePlayer getVariable["bankMoney",0];
	AsReMixhud_killsB 		= _thePlayer getVariable["banditKills",0];
	AsReMixhud_humanity 		= _thePlayer getVariable["humanity",0];
	AsReMixhud_zombies 		= "";
	AsReMixhud_zombiesAlive   = "";
	AsReMixhud_blood			=  "";
	AsReMixhud_pid			= "";
	AsReMixhud_puid			= "";
    AsReMixhud_hmnicon 		= "";
	AsReMixhud_svrname		= "servertitle";

	_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];};
    	
	_vitals ctrlSetStructuredText parseText format ["
		<t size='0.9'> %2 %5 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_humanity.paa'/>  <br/> 
		<t size='0.9'> %3 </t><img size='0.8' align='right' image='custom\playerhud\icons\dollars.paa'/>   <br/>
		<t size='0.9'> %13 </t><img size='0.8' align='right' image='custom\playerhud\icons\equip_safe_CA.paa'/>   <br/>
		<t size='0.9'> %10 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_killh.paa'/>  <br/> 
		<t size='0.9'> %9 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_killb.paa'/>  <br/>
		<t size='0.9'> %4 </t><img size='0.8' align='right' image='custom\playerhud\icons\As_zkill.paa'/>  <br/>	
	<t size='0.8' align='right'>%11h %12min UPTIME</t><br/>",
	AsReMixhud_blood,   //1
	AsReMixhud_humanity,//2
	[_cashMoney] call BIS_fnc_numberText,//3
	AsReMixhud_zombiekills,//4
	AsReMixhud_hmnicon,//5
	name player,//6
	AsReMixhud_zombiesAlive,//7
	AsReMixhud_zombies,//8
	AsReMixhud_killsB,//9
	AsReMixhud_killsH,//10
	_hours,//11
	_minutes2,//12
	[_bankMoney] call BIS_fnc_numberText//13
	];
	_vitals ctrlCommit 0;
        
    sleep 2;
}; 

 

Doubt that's the main issue you're having tho.

Link to comment
Share on other sites

Thank you! The HUD is now working properly!

 

Unfortunately, the currency is reading as 0, when I have set the value in the database.

 

I believe the problem lies with my inability to replace the HiveExt.dll file in the FTP. I tried a full reinstall of the 2.0 mod and I was unable to overwrite the existing HiveExt.dll file.

 

I've submitted a support ticket to my host, Vilayer, in regard to this.

 

Do you think that may be the issue in itself?

 

Thanks again!

 

Rick

Link to comment
Share on other sites

Alright, upon replacing that DLL, trading is working perfectly.

 

Unfortunately, I've run into a brand new problem.

 

When I try to deposit money using the "Online Banking" feature at my safe, it doesn't deposit any money. Regardless of the value I select, when I hit the "Deposit" button, the money on my player remains the same, and the money in my bank stays 0.

 

I see no errors in the RPT log.

 

Any ideas? =\

 

Thanks,

 

Rick

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