"Server menu" script for DayZ. Interested?

I keep getting an error in my rpt.

Code:
Error in expression <peed player <= 1) && _canDo) then {
if (s_player_servermenu < 0) then {
s_player>
  Error position: <s_player_servermenu < 0) then {
s_player>
  Error Undefined variable in expression: s_player_servermenu
File mpmissions\__CUR_MP.Napf\Scripts\Custom\fn_selfActions.sqf, line 20
 
I copied EVERYTHING from the long filename file. What this is saying is the variable wasn't initialized which I do not see it being. The check should be if (isNil s_player_servermenu) instead of >0
 
ok so i get this error: script call fnc_it_servermenuopen; not found
That is when i press the menu button in game, i am a total noob and tryed to figure out what was wrong for the last 3 houers but now i give up, any pointers to where my problem is\can be?
 
Did you actually follow the install instructions? That error would only show if you did not install the script correctly.
 
damn was to quick to say i fixed it.. still cant get it to start, so what i did i maid a functions folder, inside that i putted rules,tipsmenu,info,menuclose and menuopen.sqf took all the data from the IT_ServerMenuInit.sqf and devided it in to eatch file as i was guessing this was the way to do it. i directed my fn_selfactions.sqf to the functions\menuopen.sqf and did the same in the init.sqf
Still i get the menu option ingame but it still dossent open anything when i press it.
any ideas?
 
The steps you described sounded waay more complicated than my install instructions.
Are you sure that you have read the install instructions included with the download?
 
How did you fix this problem please as i'm getting the exact same problem after following your install instruction, have i missed something??
 
I can confirm that the issue has been found in version 151. Something must have gone wrong since that version.
A fix will be applied soon.
 
Hi people I have added this to my server but get errors in Client side .rtp none in server side:
They are as follows:


Error in expression <er_servermenu = -1;
player removeAction s_player_servermenu1;
player removeActio>
Error position: <s_player_servermenu1;
player removeActio>
Error Undefined variable in expression: s_player_servermenu1
File mpmissions\__CUR_MP.Napf\compile\fn_selfActions.sqf, line 41
------------------------------------------------------------------------------------------
Error in expression <peed player <= 1) && _canDo) then {
if (s_player_servermenu < 0) then {
s_player>
Error position: <s_player_servermenu < 0) then {
s_player>
Error Undefined variable in expression: s_player_servermenu
File mpmissions\__CUR_MP.Napf\compile\fn_selfActions.sqf, line 35
---------------------------------------------------------------------------------------------
This is the fn-selfaction bit
if((speed player <= 1) && _canDo) then {
if (s_player_servermenu < 0) then { -------this is line35 ----------
s_player_servermenu = player addAction [("<t color=""#f2cb0b"">" + ("Server Menu") +"</t>"),"custom\IT_Modules\menuLauncher.sqf","",-1,false,false,"", ""];
};
} else {
player removeAction s_player_servermenu;
s_player_servermenu = -1;
player removeAction s_player_servermenu1; --------this is line41------
player removeAction s_player_servermenu2;
player removeAction s_player_servermenu3;
player removeAction s_player_servermenu4;
player removeAction s_player_servermenuCancel;
};

Any help would be appreciated
MegaZ
 
Hi thanks fro the reply ShootingBlanks - from the fn-selfaction above it is defined as -1

player removeAction s_player_servermenu;
s_player_servermenu = -1;
player removeAction s_player_servermenu1; --------this is line41------

not sure if thats what you are talking a bout.
MegaZ
 
Yes, but that is defined AFTER the error has already occurred. I am not sure why you get those errors on the addaction once in a while, I am sure someone will tell us. Probably because its comparing the variable to zero when the variable is NULL. So the solution is to define s_player_servermenu as a number (-1) BEFORE your code makes that comparison.
And if you look in your dayz_code.pbo for variables.sqf it has a part that does exactly that
Code:
//Player self-action handles
dayz_resetSelfActions = {
    s_player_equip_carry = -1;
    s_player_dragbody = -1;
    s_player_fire = -1;
    s_player_cook = -1;
    s_player_boil = -1;
    s_player_fireout = -1;
    s_player_butcher = -1;
    s_player_packtent = -1;
    s_player_fillwater = -1;
    s_player_fillwater2 = -1;
    s_player_fillfuel = -1;
    s_player_grabflare = -1;
    s_player_removeflare = -1;
    s_player_painkiller = -1;
    s_player_studybody = -1;
    s_build_Sandbag1_DZ = -1;
    s_build_Hedgehog_DZ = -1;
    s_build_Wire_cat1 = -1;
    s_player_deleteBuild = -1;
    s_player_forceSave = -1;
    s_player_flipveh = -1;
    s_player_stats = -1;
    s_player_sleep = -1;
    s_player_fillfuel20 = -1;
    s_player_fillfuel5 = -1;
    s_player_siphonfuel = -1;
    s_player_repair_crtl = -1;
    s_player_fishing = -1;
    s_player_fishing_veh = -1;
    s_player_gather = -1;
};
The variables.sqf file is loaded in before your codes start running so all those self_action handles have already been defined as -1 EXCEPT the ones you are using. So put your s_player_servermenu = -1; into that code block in variables.sqf and move that file into your mission folder. You have to edit your compiles.sqf to point to the new variables.sqf location, and if you don't have the compiles.sqf in your mission you will need that too and give the new location in your init.sqf.

OR you could just define s_player_servermenu = -1; in your init.sqf file for a quick fix.
 
Hi I have added this the the varible.sqf as below, But still get the error.

//Player self-action handles
dayz_resetSelfActions = {
s_player_fire = -1;
etc
ect

s_player_lockUnlock_crtl = -1;
s_player_servermenu = -1;


and also added it to the init.sqf as below and still get theses errors spamming the hell out of the rtp

// DayZ Epochconfig
//Customize Death Messages
//Enables global chat messaging of player deaths. (Also requires enableRadio true;?) (Default: false)
DZE_DeathMsgGlobal = false;
//Enables side chat messaging of player deaths. (Also requires enableRadio true;?) (Default: false)
DZE_DeathMsgSide = true;
//Enables global title text messaging of player deaths. (Default: false)
DZE_DeathMsgTitleText = true;
spawnShoremode = 1; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500
s_player_servermenu = -1;

Any other suggestions ?
thanks
MegaZ
 
Back
Top