EpochModTeam / DayZ-Epoch

Experimental DayZ Mod for Arma 2
http://epochmodteam.github.io/DayZ-Epoch
226 stars 398 forks source link

Anyway to not use the database for traders? #355

Closed MajeoT closed 11 years ago

MajeoT commented 11 years ago

Is there anyway to turn off the traders access the database and to always have their items in stock?

As I'm always having to restart the server due to this rpt error

23:18:04 Error in expression <t select 0;

_myArray = []; if (_status == "ObjectStreamStart") then { _val = _r> 23:18:04 Error position: <== "ObjectStreamStart") then { _val = _r> 23:18:04 Error Generic error in expression 23:18:04 File z\addons\dayz_server\compile\server_traders.sqf, line 21

MajeoT commented 11 years ago

Any body? I really cant work out how to fix this and it disables the traders!

kikyou2 commented 11 years ago

Create a MySQL Event like that

DELIMITER | CREATE EVENT myevent ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO BEGINUPDATE traders_data SET qty=99 WHERE qty=0;END | DELIMITER ;

That will refill every hour the stock automatically.

MajeoT commented 11 years ago

The error isnt related to stock AFAIK unless them being out of stuck is the reason why I'm getting this error?

I just figured that using the database is whats causing them to stop functioning sometimes so if I dont need to use the database it will never happen is my thoughts

vbawol commented 11 years ago

What is on line 21? "z\addons\dayz_server\compile\server_traders.sqf, line 21"

MajeoT commented 11 years ago

line21 =

if (_status == "ObjectStreamStart") then {

and then this is the code below

_val = _result select 1;
//Stream Objects
diag_log ("HIVE: Commence Menu Streaming...");
for "_i" from 1 to _val do {
    _data = "HiveEXT" callExtension _key;
    _result = call compile format ["%1",_data];
    _status = _result select 0;
    _retrader set [count _retrader,_result];

    //diag_log ("HIVE: Loop ");
};
//diag_log ("HIVE: Streamed " + str(_val) + " objects");

};

and this is the line above:

_myArray = [];

Its the same as whats on here on github already I think

maca134 commented 11 years ago

Hey Im having exactly the same issue. My log show all the same errors.

MajeoT, is your server hosted with DayZst?

MajeoT commented 11 years ago

Dedicated server mate :)

MajeoT commented 11 years ago

Still getting this error, line 20 instead now though. I've searched the trader data for wrongly spelt items but some items are very obscure so I really dont know.

deadlokd commented 11 years ago

best bet.. reset your server.. back up your tables.. and RESET your tables to default..

this fixes many issues.. also you may want to redo your server pbo.... i have dayz.st so all i have to do is change the map, and take off the mod, and turn the server back on,, then go back and put it back to cherno, epoch, save restart. check tables. you should have them reset, if not do it again.

deadlokd commented 11 years ago

if anyone wants to figure this out.. join me on teamspeak ts60.gameservers.com:9150

TayTayTheKiller commented 11 years ago

Having the same issue. Deleting the trader tables and importing fresh ones seems to fix if for a bit but its a huge pain in the ass having to restart the server all the time.

MajeoT commented 11 years ago

Still interested in this, could you move away from the database idea or at least give an option for a non-database selling trader system? Constantly having to reset the server!

vbawol commented 11 years ago

Easier said then done, We will be looking at optimizing the calls related to this.