Jump to content

[Alpha Release] Single Currency 3.0 & Storage DEFAULT HIVE ( No global banking).


Recommended Posts

howdy, is there a for dummies version of the install instruction for a server thats already modded ?   thank you   still learning my way thru this stuff :)

 

The install instructions is a dummy version of already modded server ^^

Link to comment
Share on other sites

dont work sql file to DB
 

DECLARE player_cursor CURSOR FOR 
SELECT PlayerUID
FROM player_data;

OPEN player_cursor;

FETCH NEXT FROM player_cursor 
INTO @player_id;

WHILE @@FETCH_STATUS = 0;
BEGIN
   
	DECLARE @charid INT;
	DECLARE @player_money BIGINT;
	DECLARE @player_bank BIGINT;
	DECLARE @thesum BIGINT;
	DECLARE @player_gear LONGTEXT;

	set @charid = -1;
	set @player_money = 0;
	set @player_bank = 0;
	
	select @charid = CharacterID, @player_money = CashMoney, @player_gear = SUBSTRING(Inventory , 1, CHAR_LENGTH(Inventory ) - 1) from character_data where PlayerUID = @player_id and Alive = 1;
	select @player_bank = BankSaldo from banking_data where PlayerUID = @player_id;
	
	IF @charid <> -1;
	THEN	
		@thesum = @player_money + @player_bank;

                set @player_gear = CONCAT(​@player_gear, @thesum, ']');

		UPDATE character_data SET Inventory = @player_gear WHERE CharacterID = @charid;
		
	END IF;

    FETCH NEXT FROM player_cursor 
    INTO @player_id
END 
CLOSE player_cursor;
DEALLOCATE player_cursor;

error

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE player_cursor CURSOR FOR
SELECT PlayerUID
FROM player_data' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPEN player_cursor' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FETCH NEXT FROM player_cursor
INTO @player_id' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @@FETCH_STATUS = 0' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @charid INT' at line 3
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @player_money BIGINT' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @player_bank BIGINT' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @thesum BIGINT' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @player_gear LONGTEXT' at line 1
Query OK, 0 rows affected
 
Query OK, 0 rows affected
 
Query OK, 0 rows affected
 
1054 - Unknown column 'CashMoney' in 'field list'
1146 - Table 'dayz_epoch_vtx_napf.banking_data' doesn't exist
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF @charid <> -1' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THEN
@thesum = @player_money + @player_bank' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@player_gear, @thesum, ']')' at line 1
Query OK, 0 rows affected
Rows matched: 0  Changed: 0  Warnings: 0
 
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FETCH NEXT FROM player_cursor
    INTO @player_id
END
CLOSE player_cursor' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'player_cursor' at line 1

Link to comment
Share on other sites

dont work sql file to DB

 

DECLARE player_cursor CURSOR FOR 
SELECT PlayerUID
FROM player_data;

OPEN player_cursor;

FETCH NEXT FROM player_cursor 
INTO @player_id;

WHILE @@FETCH_STATUS = 0;
BEGIN
   
	DECLARE @charid INT;
	DECLARE @player_money BIGINT;
	DECLARE @player_bank BIGINT;
	DECLARE @thesum BIGINT;
	DECLARE @player_gear LONGTEXT;

	set @charid = -1;
	set @player_money = 0;
	set @player_bank = 0;
	
	select @charid = CharacterID, @player_money = CashMoney, @player_gear = SUBSTRING(Inventory , 1, CHAR_LENGTH(Inventory ) - 1) from character_data where PlayerUID = @player_id and Alive = 1;
	select @player_bank = BankSaldo from banking_data where PlayerUID = @player_id;
	
	IF @charid <> -1;
	THEN	
		@thesum = @player_money + @player_bank;

                set @player_gear = CONCAT(​@player_gear, @thesum, ']');

		UPDATE character_data SET Inventory = @player_gear WHERE CharacterID = @charid;
		
	END IF;

    FETCH NEXT FROM player_cursor 
    INTO @player_id
END 
CLOSE player_cursor;
DEALLOCATE player_cursor;

error

1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE player_cursor CURSOR FOR
SELECT PlayerUID
FROM player_data' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'OPEN player_cursor' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FETCH NEXT FROM player_cursor
INTO @player_id' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE @@FETCH_STATUS = 0' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @charid INT' at line 3
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @player_money BIGINT' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @player_bank BIGINT' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @thesum BIGINT' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE @player_gear LONGTEXT' at line 1
Query OK, 0 rows affected
 
Query OK, 0 rows affected
 
Query OK, 0 rows affected
 
1054 - Unknown column 'CashMoney' in 'field list'
1146 - Table 'dayz_epoch_vtx_napf.banking_data' doesn't exist
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF @charid <> -1' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'THEN
@thesum = @player_money + @player_bank' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@player_gear, @thesum, ']')' at line 1
Query OK, 0 rows affected
Rows matched: 0  Changed: 0  Warnings: 0
 
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FETCH NEXT FROM player_cursor
    INTO @player_id
END
CLOSE player_cursor' at line 1
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'player_cursor' at line 1

 

It clearly states  it is not ready yet ( the sql scriptt.)

 

So sorry, u'll have to wait abit ^^

Link to comment
Share on other sites

 

[["m16a4_acg","M9SD","ItemMap","ItemHatchet_DZE","ItemRadio","ItemToolbox","EvMoney","ItemKeyBlack1131","ItemKeyGreen1845","ItemGPS"],["ItemPainkiller","ItemEpinephrine","ItemMorphine","ItemWaterbottleBoiled","FoodPistachio","100Rnd_556x45_BetaCMag","100Rnd_556x45_BetaCMag","ItemAntibiotic","ItemEpinephrine","ItemMorphine","ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"],1830]

 

 

Im assuming the 1830 is the coins I have so its working, 

It shows the 1830 coins icon on left for a few seconds after loading into game then the coins icon disappears.

does not show anywhere...

 

this is my description.ext

 

class RscTitles
{ 
#include "dzgm\icons.hpp"
class zCamoStatusGUI {
idd = -1;
fadeout=0;
fadein=0;
onLoad = "uiNamespace setVariable ['zCamo_GUI_display', _this select 0]";
duration = 10e10;
name= "zCamoGui";
controlsBackground[] = {};
objects[] = {};
class controls {
class zCamoIcon:RscPictureGUI {
idc = 1;
text="custom\walkamongstthedead\zombie.paa";
x="0.958313 * safezoneW + safezoneX";
y="0.43 * safezoneH + safezoneY";
w=0.059999999;
h=0.079999998;
colorText[]={1,1,1,1};
};
};
};
#include "ZSC\config\ZSChud.hpp"
}; 

 

I also notice  I have two _inventory = [ in my server_updateObjects.sqf

 

_object_inventory = {
private["_inventory","_previous","_key"];
if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _inventory = _object getVariable ["AddedPUIDS", []]; //We're replacing the inventory with UIDs for this item
} else {
    _inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object


];
};
/* Get the Inventory of the Vehicle */
_inventory = [
getWeaponCargo _object,
getMagazineCargo _object,
getBackpackCargo _object
/*ZSC*/
, _object getVariable["bankMoney",0]
/*ZSC*/
];

I tried 

, _object getVariable["bankMoney",0]

in both locations (still not showing coins :(

 

 

 

Post your whole server_updateObject.sqf file please. ( which normally is correct, cus it does get saved.

 

Post your init.sqf ( where u call the debug monitor thingy).

Link to comment
Share on other sites

Post your whole server_updateObject.sqf file please. ( which normally is correct, cus it does get saved.

 

Post your init.sqf ( where u call the debug monitor thingy).

server_updateObject.sqf: http://pastebin.com/FD6R2J5X

 

 

 

init.sqf ( where u call the debug monitor thingy).

if (!isDedicated) then {
execVM "custom\kill_msg.sqf";
[10] ExecVM "custom\AutoEpi.sqf";
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
[] execVM 'custom\mining\init.sqf';     //Added for Mining
//Custom Loadouts
// [] ExecVM "custom\loadout.sqf";
_nil = [] execVM "custom\VASP\VASP_init.sqf";
execVM "service_point\service_point.sqf";
_nil = [] execVM "custom\JAEM\EvacChopper_init.sqf";
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =  [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; 
execVM "ZSC\compiles\playerHud.sqf";
[] execVM "TradeFromVehicle\init.sqf";
ExecVM "TradeFromVehicle Version 2.0\setup\init.sqf";
[] execVM "dzgm\init.sqf";
// [] execVM "baseJump.sqf";

again coins icon shows for a few seconds at first loading in then disappears

Link to comment
Share on other sites

 

server_updateObject.sqf: http://pastebin.com/FD6R2J5X

 

 

 

init.sqf ( where u call the debug monitor thingy).

if (!isDedicated) then {
execVM "custom\kill_msg.sqf";
[10] ExecVM "custom\AutoEpi.sqf";
//Conduct map operations
0 fadeSound 0;
waitUntil {!isNil "dayz_loadScreenMsg"};
dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
[] execVM 'custom\mining\init.sqf';     //Added for Mining
//Custom Loadouts
// [] ExecVM "custom\loadout.sqf";
_nil = [] execVM "custom\VASP\VASP_init.sqf";
execVM "service_point\service_point.sqf";
_nil = [] execVM "custom\JAEM\EvacChopper_init.sqf";
//Run the player monitor
_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
_playerMonitor =  [] execVM "\z\addons\dayz_code\system\player_monitor.sqf"; 
execVM "ZSC\compiles\playerHud.sqf";
[] execVM "TradeFromVehicle\init.sqf";
ExecVM "TradeFromVehicle Version 2.0\setup\init.sqf";
[] execVM "dzgm\init.sqf";
// [] execVM "baseJump.sqf";

again coins icon shows for a few seconds at first loading in then disappears

 

 

no client rpt errors?

Link to comment
Share on other sites

no client rpt errors?

Error in expression <nt _digits - 1;
_modBase = _digitsCount % _mod;
_numberText = "";


{
_numberText>
  Error position: <% _mod;
_numberText = "";


{
_numberText>
  Error %: Type Script, expected Number
File mpmissions\__CUR_MP.Tavi\ZSC\compiles\numberText.sqf, line 12
Error in expression <;
};
};
Link to comment
Share on other sites

 

Error in expression <nt _digits - 1;
_modBase = _digitsCount % _mod;
_numberText = "";


{
_numberText>
  Error position: <% _mod;
_numberText = "";


{
_numberText>
  Error %: Type Script, expected Number
File mpmissions\__CUR_MP.Tavi\ZSC\compiles\numberText.sqf, line 12
Error in expression <;
};
};

 

 

U give text instead of a number to that functions, thats why it isn't showing.

 

Post your gearset.sqf ( should be mine :) )

Link to comment
Share on other sites

U give text instead of a number to that functions, thats why it isn't showing.

 

Post your gearset.sqf ( should be mine :) )

 

player_gearSet.sqf

 

private ["_inventory","_wpns","_mags","_idc","_isOK","_money"];
_inventory = _this;
if (count _inventory > 0) then {
_wpns = _inventory select 0;
_mags = _inventory select 1;


if (count _inventory > 2) then {
_money =  _inventory select 2;
player setVariable["cashMoney",_money,true];
}else{
player setVariable["cashMoney",0,true];
};






//Add inventory
{
private["_item","_val"];
//is it an array?
_idc = 109;
if (typeName _x == "ARRAY") then {
_item = _x select 0;
_val =  _x select 1;
} else {
_item = _x;
_val = -1;
};


if (_item == "BoltSteel") then { _item = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
if (_item == "ItemTent") then { _item = "ItemTentOld" };


//Is item legal?
_isOK =  isClass(configFile >> "CfgMagazines" >> _item);
if (_isOK) then {
if (_val != -1) then {
player addMagazine [_item,_val];
} else {
player addMagazine _item;
};
};
_idc = _idc + 1;
} count _mags;


//Add weapons
{
if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
};


//Is item legal?
_isOK =  isClass(configFile >> "CfgWeapons" >> _x);
if (_isOK) then {
player addWeapon _x;
};
} count _wpns;
};

 

do I need to change the path in my compiles

player_gearSet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.sqf";

I see in your ZSCinit.sqf

player_gearSet = compile preprocessFileLineNumbers "ZSC\compiles\player_gearSet.sqf";
Link to comment
Share on other sites

 

player_gearSet.sqf

 

private ["_inventory","_wpns","_mags","_idc","_isOK","_money"];
_inventory = _this;
if (count _inventory > 0) then {
_wpns = _inventory select 0;
_mags = _inventory select 1;


if (count _inventory > 2) then {
_money =  _inventory select 2;
player setVariable["cashMoney",_money,true];
}else{
player setVariable["cashMoney",0,true];
};






//Add inventory
{
private["_item","_val"];
//is it an array?
_idc = 109;
if (typeName _x == "ARRAY") then {
_item = _x select 0;
_val =  _x select 1;
} else {
_item = _x;
_val = -1;
};


if (_item == "BoltSteel") then { _item = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
if (_item == "ItemTent") then { _item = "ItemTentOld" };


//Is item legal?
_isOK =  isClass(configFile >> "CfgMagazines" >> _item);
if (_isOK) then {
if (_val != -1) then {
player addMagazine [_item,_val];
} else {
player addMagazine _item;
};
};
_idc = _idc + 1;
} count _mags;


//Add weapons
{
if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
};


//Is item legal?
_isOK =  isClass(configFile >> "CfgWeapons" >> _x);
if (_isOK) then {
player addWeapon _x;
};
} count _wpns;
};

 

do I need to change the path in my compiles

player_gearSet = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_gearSet.sqf";

I see in your ZSCinit.sqf

player_gearSet = compile preprocessFileLineNumbers "ZSC\compiles\player_gearSet.sqf";

 

 

IT could be your compiles overwrite mine yes. Depends how u placed the files.

Link to comment
Share on other sites

IT could be your compiles overwrite mine yes. Depends how u placed the files.

could it be a problem in my description.ext ?

I just have a feeling there lies the problem.

 

well anywayz, Im just going to re-script my server fresh.

its a mess anywayz...

 

thankz for your help and great contributions 

Link to comment
Share on other sites

Wanna see my init.sqf? ^^

#include "zupa\server\important.sqf"
#include "zupa\server\config.sqf"
#include "zupa\server\loads.sqf"
#include "zupa\server\serverinstance.sqf"	
endLoadingScreen;
#include "zupa\server\playerinstance.sqf"	
execVM "zupa\weather\DynamicWeatherEffects.sqf";
#include "\z\addons\dayz_code\system\BIS_Effects\init.sqf"
endLoadingScreen; 
#include "zupa\server\extra.sqf"
Link to comment
Share on other sites

new convert.sql dont work
 

[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE done INT DEFAULT 0;
DECLARE @player_id VARCHAR DEFAULT "-1";
DECLARE @' at line 1
[Err] DECLARE done INT DEFAULT 0;
DECLARE @player_id VARCHAR DEFAULT "-1";
DECLARE @instance INT DEFAULT 11;
/* Cherno = 11 or 17 , Tavi = 13 and so on. just check your Database to see instance number.  */
DECLARE player_cursor CURSOR FOR SELECT PlayerUID FROM player_data;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;
OPEN player_cursor;

read_loop: LOOP  
	FETCH player_cursor INTO @player_id;
	IF done <> 0 THEN
      LEAVE read_loop;
    END IF;

	DECLARE @charid INT DEFAULT -1;
	DECLARE @player_money BIGINT DEFAULT 0;
	DECLARE @player_bank BIGINT DEFAULT 0;
	DECLARE @thesum BIGINT DEFAULT 0;
	DECLARE @player_gear LONGTEXT DEFAULT '[]';
	
	select @charid = CharacterID, @player_money = CashMoney, @player_gear = SUBSTRING(Inventory , 1, CHAR_LENGTH(Inventory ) - 1) from character_data where PlayerUID = @player_id and Alive = 1;
	select @player_bank = BankSaldo from banking_data where PlayerUID = @player_id;
	
	/* 999 hive , comment the previous 2 lines out and use the 2 following.
	select @charid = CharacterID, @player_money = HeadshotsZ, @player_gear = SUBSTRING(Inventory , 1, CHAR_LENGTH(Inventory ) - 1) from character_data where PlayerUID = @player_id and Alive = 1;	
	select @player_bank = PlayerMorality from player_data where PlayerUID = @player_id;
	*/
	
	IF @charid <> -1 THEN	
		@thesum = @player_money + @player_bank;
        set @player_gear = CONCAT(@player_gear, @thesum, ']');
		UPDATE character_data SET Inventory = @player_gear WHERE CharacterID = @charid;
	ELSE
		set @player_gear = CONCAT('[["ItemFlashlight","ItemMap","ItemCompass","ItemHatchet","ItemKnife","ItemMatchbox","ItemWatch"],["FoodSteakCooked","ItemSodaCoke","ItemBloodbag","ItemPainkiller","ItemAntibiotic","ItemMorphine","ItemEpinephrine","ItemBandage","ItemBandage","ItemBandage"],', @player_bank, ']');
		INSERT INTO `character_data` (`CharacterID`, `PlayerUID`, `InstanceID`, `Datestamp`, `LastLogin`, `Inventory`, `Backpack`, `Worldspace`, `Medical`, `Alive`, `Generation`, `LastAte`, `LastDrank`, `KillsZ`, `HeadshotsZ`, `DistanceFoot`, `Duration`, `CurrentState`, `KillsH`, `Model`, `KillsB`, `Humanity`, `Infected`) VALUES (NULL, @player_id, @instance, '2014-11-22 15:02:02', '2014-11-24 22:05:43', @player_gear, '["DZ_Backpack_EP1",[[],[]],[[],[]]]', '[158,[6320.97,7795.51,0.278]]', '[false,false,false,false,false,false,false,12000,[],[0,0],0,[64.82,61.753]]', 1, 99, '2014-11-22 15:02:02', '2014-11-22 15:02:02', 0, 0, 0, 46, '["","aidlpercmstpsraswrfldnon_idlesteady03",42,[]]', 0, 'Survivor2_DZ', 0, 2500, 0);
		/* If the guys didn't had an alive character this creates a char for him with his bankmoney as cash on him in stary sobor. */
	END IF;

END LOOP; 
CLOSE player_cursor;
DEALLOCATE player_cursor;

ALTER TABLE character_data DROP COLUMN CashMoney;
[Msg] Finished - Unsuccessfully
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...