Jump to content
Sign in to follow this  
KOR_Taru

need help to Engineer class exception handling on arsenal script

Recommended Posts

Hi I have a problem fixing the code, so I ask for help like this.
In Arsenal, I modified the code so that only engineers can bring explosives, but the error continues to be printed if am i wrong language was used. any ideas?

 

[] spawn {
    waitUntil{
        if (("B_engineer_F") = false) exitwith {
            [format ["<t size = '.6' color='#ff3030'>%1은(는) 사용할 수 없습니다.</t>", getText (configFile >> "CfgMagazines" >> _x >> "displayName")], 0, 1, 1] spawn BIS_fnc_dynamicText;
            player removeMagazines _x;
        } forEach ([[], magazines player arrayIntersect removemagazinexiplosives] select ARSENAL);
	};
        false
};

korean mean : %1can't use this

error list

if ("B_engineer_F" = false) then
[format ["<t size = '.6' c>
22:00:12   Error position: <= false) then
[format ["<t size = '.6' c>
22:00:12   Error ) is missing
22:00:12 File C:\Users\1234\Documents\Arma 3 - Other Profiles\Taru\mpmissions\RSF_DEVELOP3.Altis\initPlayerLocal.sqf..., line 422

(english translated, sry)

Share this post


Link to post
Share on other sites
(("B_engineer_F") = false)

 

should be

 

(typeOf player != "B_engineer_F")

 

there maybe some other errors too, not certain without seeing more of the code

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites
6 hours ago, gc8 said:

(("B_engineer_F") = false)

 

should be

 


(typeOf player != "B_engineer_F")

 

there maybe some other errors too, not certain without seeing more of the code

 

 

yes, as you said, there are some errors. There's been more errors due to the backlog of the code, and I think need to solve this again.

I see 2 options errors, maybe need to edit this part again

 5:22:34 Error in expression <etText (configFile >> "CfgMagazines" >> _x >> "displayName")], 0, 1, 1] spawn BI>
 5:22:34   Error position: <_x >> "displayName")], 0, 1, 1] spawn BI>
 5:22:34  Error  expression has an undefined variable (_x).
 5:22:34 File C:\Users\1234\Documents\Arma 3 - Other Profiles\Taru\mpmissions\RSF_DEVELOP3.Altis\initPlayerLocal.sqf..., line 422
 5:22:34 Error in expression <namicText;
player removeMagazines _x;
} forEach ([[], magazines player arrayInte>
 5:22:34   Error position: <forEach ([[], magazines player arrayInte>
 5:22:34   Error foreach: None type was used. (Request: code)
 5:22:34 File C:\Users\1234\Documents\Arma 3 - Other Profiles\Taru\mpmissions\RSF_DEVELOP3.Altis\initPlayerLocal.sqf..., line 424

 

Share this post


Link to post
Share on other sites

So I modified the code a little bit, and the next error is printed, but there seems to be no mistake, but the error is printed. Can you tell me where I'm wrong?

 

[] spawn {
    waitUntil{
		if (typeof player !="B_engineer_F") then {
            [format ["<t size = '.6' color='#ff3030'>%1은(는) 사용할 수 없습니다.</t>", getText (configFile >> "CfgMagazines" >> _x >> "displayName")], 0, 1, 1] spawn BIS_fnc_dynamicText;
            player removeMagazines _x;
        } forEach ([[], magazines player arrayIntersect removemagazinexiplosives], nil, (),select ARSENAL);
	};
        false
};

error : 

18:41:38   Error position: <, nil, (),select ARSENAL);
};
false
};

>
18:41:38   Error ) is missing.
18:41:38 File C:\Users\1234\Documents\Arma 3 - Other Profiles\Taru\mpmissions\RSF_DEVELOP3.Altis\initPlayerLocal.sqf..., line 424

any have idea fix this problem?

Share this post


Link to post
Share on other sites

this line has a lot of problems:

 

forEach ([[], magazines player arrayIntersect removemagazinexiplosives], nil, (),select ARSENAL);

 

not sure what it's supposed to do

sorry

Share this post


Link to post
Share on other sites
3 hours ago, gc8 said:

this line has a lot of problems:

 


forEach ([[], magazines player arrayIntersect removemagazinexiplosives], nil, (),select ARSENAL);

 

not sure what it's supposed to do

sorry

it's ok, i'll find to fix this problem at soon, thanks to answer my questions hehe

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×