pyro05x 0 Posted January 18, 2007 here's my error message: Quote[/b] ]'...light42 setLightBrightness 0; light00 |#|setLightColor _col; light10 setLightColo...' Error setlightcolor: Type Number, expected Array File mpmissions\__cur_mp.Sara\setLights.sqf, line 47 my init.sqf calls this script: setLights.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_col","_amb"]; _col = [.5, .5, .5]; _amb = [.1, .1, .1]; if (local server) then { lightCoord = compile loadFile "lightCoord.sqf"; light00 = "#lightpoint" createVehicle ([0,0] call lightCoord); light10 = "#lightpoint" createVehicle ([1,0] call lightCoord); ... light42 = "#lightpoint" createVehicle ([4,2] call lightCoord); }; sleep 5; light00 setLightBrightness 0; light10 setLightBrightness 0; ... light42 setLightBrightness 0; light00 setLightColor _col; // line 47 light10 setLightColor _col; ... i don't understand this. _col is clearly defined as an array. i need some help figuring this one out. any help greatly appreciated Share this post Link to post Share on other sites
pyro05x 0 Posted January 19, 2007 turns out i just had to put it down for awhile. i loaded it up later and noticed this: lightCoord.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_row = _this select 0; _col = _this select 1; _x = 18197.2 + (10.06540045465111*cos(10))*_row + (6.0463683521595335*cos(100))*_col; _y = 18180.8 + (10.06540045465111*sin(10))*_row + (6.0463683521595335*sin(100))*_col; _return = [_x,_y,7]; _return turns out that it had nothing to do with the object, but the function. _col was shared among both files because _col had 2 different meanings; color and column. i simply forgot to add this: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private ["_row","_col","_x","_y","_return"]; in theory, this should fix it. if not, i'll have to recycle my variables, _x and _y. Share this post Link to post Share on other sites