Jump to content
  • 0

clothesTaken error!


freakystyle

Question

Hey i have a Problem. this Take Clothes Script by Zabns spamt my client. Can anyone help me ?

 

Take Clothes Script.

 

Mod: DayZ Overpoch

Epoch Version: 1.0.5.1

 

The Error.

Error in expression <getVariable["clothesTaken",false]; 
if (_isMan and !_isAlive and !_isZombie and >
  Error position: <_isMan and !_isAlive and !_isZombie and >
  Error Undefined variable in expression: _isman
File mpmissions\__CUR_MP.chernarus\Fixes\fn_selfActions.sqf, line 957

 

And this is my  fn_selfAction.sqf

//****************************** Take Clothes ************************************************************//
_clothesTaken = cursorTarget getVariable["clothesTaken",false]; 
if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {
 if (s_player_clothes < 0) then {
         s_player_clothes = player addAction [("<t color='#0096ff'>")+("Take Clothes")+("</t>"), "Scripts\TakeClothes\player_takeClothes.sqf",cursorTarget, -10, false, true, "",""];
    };
} else {
    player removeAction s_player_clothes;
    s_player_clothes = -1;         
};
//****************************** End ************************************************************//

Can anyone help me for fix that? :)

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

I dont understand this, can you say me this step by step?

 

so?

_clothesTaken = cursorTarget getVariable["clothesTaken",false]; 
if (!isNull cursorTarget && (player distance cursorTarget < 3)) then {
 if (s_player_clothes < 0) then {
         s_player_clothes = player addAction [("<t color='#0096ff'>")+("Take Clothes")+("</t>"), "Scripts\TakeClothes\player_takeClothes.sqf",cursorTarget, -10, false, true, "",""];
    };
} else {
    player removeAction s_player_clothes;
    s_player_clothes = -1;         
};

i have no idea^^

Link to comment
Share on other sites

  • 0

Your part

_clothesTaken = cursorTarget getVariable["clothesTaken",false]; 
if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {
if (s_player_clothes < 0) then {
s_player_clothes = player addAction [("<t color='#0096ff'>")+("Take Clothes")+("</t>"), "Scripts\TakeClothes\player_takeClothes.sqf",cursorTarget, -10, false, true, "",""];
};
} else {
player removeAction s_player_clothes;
s_player_clothes = -1; 
};

 

has to be put somewhere after this expression in order to avoid your error:

_isMan = cursorTarget isKindOf "Man";
Link to comment
Share on other sites

  • 0

i was trying to look over this code for you, but im gonna need your init.sqf aswell..anyway tomorow will be another day. 

 

Okay. i upload my init.sqf.

 

Line2.lv

Just read my PM which I send you yestarday.

 

@Line2.lv

 

Need help in this Topic?? >>

Check out my forum >> http://Line2.lv/Forums and check out my Guide of that script...

If it still does not help you, PM me back.

If it helps you, register in my community because I`ll re-share many more scripts in future.

 

NO....this is a Forum for help. ;)

init.zip

Link to comment
Share on other sites

  • 0

If you are so damn lazy and want everything to be done for you, then sit in this Forum and wait for your help... Just wanted to help you out.

It`s such simple script...

 

BTW, you should credit the script makers on your site tutorials. 

Link to comment
Share on other sites

  • 0

If you are so damn lazy and want everything to be done for you, then sit in this Forum and wait for your help... Just wanted to help you out.

It`s such simple script...

Haha....I'm not damn lazy..I only asked how I can fix that. Step by Step. And they advertise their side, this is a Office Epoch Forum!

Link to comment
Share on other sites

  • 0

ok sorry about the delay, i havnt tested this in my server yet. but i will install it tonight possibly.. Otherwise this is what i see..

 

you didnt add the :

init.sqf:
Code (Text):
fnc_usec_selfActions = compile preprocessFileLineNumbers "scripts\fn_selfActions.sqf";


just after this code:


init.sqf:
Code (Text):
call compile preprocessFileLineNumbers "\z\addons\dayz_code\init\compiles.sqf";
progressLoadingScreen 1.0; 

which is understandable. but you should try it with that code in the init.sqf..   try this before other changes and see if it helps.. 

 

 

 

also i noticed this, i understand you made a TAKE CLOTHES Folder in your scripts folder which is understandable.. but did you also rename the file that Zabn sent.. becuase i also noticed this..:::

 

this is from his site::

        _clothesTaken = _cursorTarget getVariable["clothesTaken",false];

    // Take clothes by Zabn
    if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {
        if (s_player_clothes < 0) then {
            s_player_clothes = player addAction [("<t color='#0096ff'>")+("Take Clothes")+("</t>"), 



"scripts\player_takeClothes_v2.sqf",[_cursorTarget], -10, false, true, "",""];
     




   };
    } else {
        player removeAction s_player_clothes;
        s_player_clothes = -1;
        };

                                            Zabn's code above says:      player_takeClothes_v2.sqf

 

and in your code you have:::below you have ::                 player_takeClothes.sqf 

_clothesTaken = cursorTarget getVariable["clothesTaken",false]; 
if (_isMan and !_isAlive and !_isZombie and !_clothesTaken) then {
 if (s_player_clothes < 0) then {
         s_player_clothes = player addAction [("<t color='#0096ff'>")+("Take Clothes")+("</t>"), "Scripts\TakeClothes\player_takeClothes.sqf",cursorTarget, -10, false, true, "",""];
    };
} else {
    player removeAction s_player_clothes;
    s_player_clothes = -1;         
};

   also one more thing i couldnt understand why Zabn on his instructions says to add this on the bottom.. even tho its already in his code above.. 

5) add this code:

fn_selfActions.sqf:
Code (Text):
    // Take Clothes by Zabn
        player removeAction s_player_clothes;
      s_player_clothes = -1;

anyway i will try to add this script into my server today so hopefully i'll let you know if i get your errors.. 

but based on your files these were the things i noticed.. hope this helps.. 

if anyone has any other input feel free to comment.. 

Link to comment
Share on other sites

  • 0

Hey

 

ah sry...Forgot to say this Script works fine^^ but i have this error in my client.rpt

 

I need the fix for this error.

Error in expression <getVariable["clothesTaken",false]; 
if (_isMan and !_isAlive and !_isZombie and >
  Error position: <_isMan and !_isAlive and !_isZombie and >
  Error Undefined variable in expression: _isman
File mpmissions\__CUR_MP.chernarus\Fixes\fn_selfActions.sqf, line 957
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...