Jump to content
  • 0

createDiaryRecord ["Diary", ["Missions", _hint2]]; .. ServerSide


MatthewK

Question

Does anyone know how I'd run this line of code in a script on my server.. If I run this locally in MP mode it works, but when i compile it and put it on my server , nothing , not even error report :(

 

The line of code is:

 

createDiaryRecord ["Diary", ["Missions and Treasure Hunts", _hint2]];

 

I've tried

 

player createDiaryRecord ["Diary", ["Missions and Treasure Hunts", _hint2]];

 

With both !isServer and !isDedicated :(

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

  • 0

Maybe its triggerred before the player is fully joined?

Not sure if the

Waituntil (player == Player); method works in arma 2..

 

Nope these are added while the player is in-game usually 10-20 minutes in after they get their first mission .. I tried that method also, didn't work.. I nearly rage quit the entire dayz epoch scene because of this lol :)

Link to comment
Share on other sites

  • 0

Ok, but don't laugh at my noobishness :(

_hint2 = format["<img size='9' image='%2'/><br/>
<t size='0.95' font='Bitstream'>Bandits have been spotted at the %1.  %4 bandits were spotted in total guarding this area. You have 30 minutes to get there and secure the area, you will receive another 15 bonus minutes if you can hold the loot area (within 50meters) until the 30 minutes is up.  Synchronise your watches and good luck..</t><br/><br/>
	<br/>Mission No: %6</t><br/><br/>",
	_MName,
	BanditImage,
	_MCrate,
	_CrateType,
	_countHeli,
	_rndMission
	]; 

player createDiaryRecord["Diary",["Mission and Treasure Hunts",_hint2]];

That works perfectly in MPlayer , but refuses to do jack on the server.. That's the entire snippet I tested, without the other code.. 

 

Edit: forget to mention that those variables are already declared.. I just assumed you'd guess that.

Link to comment
Share on other sites

  • 0

to make sure the player object is present you could add:

waitUntil {!isNull player};

before the creatediary stuff :)

 

are you calling the script using execvm?

 

 

[] execVM "/scriptdir/yourscript.sqf";

 

maybe the error is logged clientsided. i think arma2 also has a clientsided RPT log :)

Link to comment
Share on other sites

  • 0

Nope, nothing in any of the logs. I've checked online too and there's absolutely nothing about running that command server side, which is kind of dumb in this day and age.  The only way I can think of getting around it is by passing that code back through a public variable and having a while function take care of it, but that's just such unnecessary overhead lol 

Link to comment
Share on other sites

  • 0

Nope , even trying call re with the createDiaryRecord and rcreateDiaryRecord that some confusing website had an example for , didn't work.. i give up on this one.. Don't think this is turning out to be a good day for me.. Thanks again for your help guys, appreciate. 

Link to comment
Share on other sites

  • 0

FFS!!! Really ? ?? ?

If a developer is reading this , can you please stop telling US THE SERVER OWNERS what is unused and what isn't.. Give us the option of keeping the features that we've worked hard on customising, it doesn't harm your product by leaving in an option and allowing us to turn it on or off.. Stop fiddling with shit that doesn't need fixing that start fixing the shit that needs your attention, leave the option in .. if you take it out I'm done with Epoch, sick of you following the vanilla Dayz bandwagon (of do as we like it done, or fk off).. Adding in features that are just annoying and removing stuff that some of us have worked many days on adding to is unfair and subjugated.

I'm really pissed off right now, can't believe the audacity of it. It's bullshit, I'm telling you. Sick of the DayZ community acting like a bunch of dictators, forcing the more creative of us into line.. What's that on my shirt, oh it's a weird looking symbol, oh no, what's that? what do you mean I can't step out of this line and go in another direction.

Link to comment
Share on other sites

  • 0

[nilnilrHINT"This is a global Hint."call RE

 

http://community.bistudio.com/wiki/Multiplayer_framework

 

Personnaly i perfer to use a public variable ...

Already got a while loop running in dayz code checking for public variables & u can do more compilcated code in a sqf file easier i.e localisied text

Public Event Handler? No need for a loop

Link to comment
Share on other sites

  • 0

Far as I can tell, DayZ deletes player diaries for some reason. Maybe as part of the regular cleanup performed by the game.

 

On my old Lingor server, I managed to make the diary stick by using this code:

if (isServer) exitWith {};
if (player diarySubjectExists "GI") exitWith {
    
        sleep 1;
        [] execVM "Scripts\Architect\Misc\PlayerNotes.sqf";
        
        };

_GI = player createDiarySubject ["GI","General Info"];

player createDiaryRecord ["GI", ["Server Scripts and Customization",

Example Text Here."]];

sleep 1;
[]execVM "Scripts\Architect\Misc\PlayerNotes.sqf";

However, this doesn't seem to work on epoch as I get an error: "Can't find script (blank space)."

 

Sorry to bump an old thread but I'd really like to know if anyone has managed a workaround for this.

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