Jump to content
Sign in to follow this  
McArcher

Very strange question

Recommended Posts

After porting mission to non-dedi server, and running it on it, I have an error, which wasn't earlier in dedi-server's log!

part of code (it sets an EH for a control object of a dialog):

((findDisplay 1) displayCtrl 101) ctrlSetEventHandler ["LBSelChanged", 
"	

if (mcti_radioTerminal_Enabled_ru) then 
{	
private [""_n"", ""_m"", ""_t"", ""_i"", ""_f""]; 	
_n = count mcti_fieldHospitals_ru; 
_m = count mcti_mashes_ru; 
_t = lbCurSel 101; 
if (_t == (_m+_n)) then 
{ 
	my_resp = ""MHQ""; 
	((findDisplay 1) displayCtrl 103) ctrlMapAnimAdd [2.0, 0.1, mcti_gl_RU getVariable ""MHQ_pos""]; 
	ctrlMapAnimCommit ((findDisplay 1) displayCtrl 103); 
} 
else 
{   
	if (_t >= _n) then 
	{ 
		_t=_t - _n; 
		my_resp = mcti_mashes_ru select _t; 
		((findDisplay 1) displayCtrl 103) ctrlMapAnimAdd [2.0, 0.1, markerPos my_resp]; 
		ctrlMapAnimCommit ((findDisplay 1) displayCtrl 103); 
	} 
	else 
	{  
		my_resp = mcti_fieldHospitals_ru select _t; 
		((findDisplay 1) displayCtrl 103) ctrlMapAnimAdd [2.0, 0.1, markerPos my_resp]; 
		ctrlMapAnimCommit ((findDisplay 1) displayCtrl 103);  
	};    
};  
} 
else 
{ 
((findDisplay 1) displayCtrl 103) ctrlMapAnimAdd [2.0, 0.1, mcti_gl_RU getVariable ""MHQ_pos""]; 
ctrlMapAnimCommit ((findDisplay 1) displayCtrl 103); 
my_resp = ""MHQ""; 
};	

"
];

.rpt has:

Error in expression <playCtrl 103) ctrlMapAnimAdd [2.0, 0.1, markerPos my_resp]; ctrlMapAnimCommit ((>

Error position: <markerPos my_resp]; ctrlMapAnimCommit ((>

Error markerpos: Тип МножеÑтво, ожидаетÑÑ ÐŸÐ¾ÑледовательноÑÑ‚ÑŒ

Error in expression <playCtrl 103) ctrlMapAnimAdd [2.0, 0.1, markerPos my_resp]; ctrlMapAnimCommit ((>

Error position: <markerPos my_resp]; ctrlMapAnimCommit ((>

Error ÐžÐ±Ñ‰Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ° в выражении

1. he wants string instead of array...i wonder, where???:confused:

2. general error...hm.....:confused:

sorry for this mess, this EH doesn't understand { code }, only a string!!! damn syntax..!

Please, help me.

---------- Post added at 23:06 ---------- Previous post was at 22:59 ----------

and, one more moment...

the code before that with error, fills a listbox with names and coordinates. in dedi it worked, but now it doesnt. it shows [scalar, scalar] instead of public variables. very strange... they were published, i'm sure.

if (mcti_radioTerminal_Enabled_ru) then

{

_i = 0;

{

lbAdd [101, format ["Field Hospital #%1 at [%2,%3]", (_i+1), round((mcti_fieldHospitalsCoords_ru select _i) select 0), round((mcti_fieldHospitalsCoords_ru select _i) select 1) ]] ;

_i = _i + 1;

} forEach mcti_fieldHospitals_ru;

_i = 0;

{

lbAdd [101, format ["Mash #%1 at [%2,%3]", (_i+1), round((mcti_mashesCoords_ru select _i) select 0), round((mcti_mashesCoords_ru select _i) select 1) ]] ;

_i = _i + 1;

} forEach mcti_mashes_ru;

}

else

{

// no radio

ctrlSetText [104, "Radio communication: N/A"];

((findDisplay 1) displayCtrl 104) ctrlSetTextColor [0.77, 0.0, 0.0, 0.9];

};

// C# Document Edited by McArcher

Share this post


Link to post
Share on other sites

Can you format the code better? I can't really read it and understand it. You should be able to add line breaks into event handlers.

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  

×