
Originally Posted by
sbsmac
Parameters- can you provide a short code-example and I'll see what I can do.
Again I understand dynamic variable assignment is tough and it is totally fine if you decide my parameter case does not warrant an exception. Here is part of an description.ext:
Code:
class P_Hour
{
title = "Hour of day";
values[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23};
texts[] = {"00:XX", "01:XX", "02:XX", "03:XX", "04:XX", "05:XX", "06:XX", "07:XX", "08:XX", "09:XX", "10:XX", "11:XX", "12:XX", "13:XX","14:XX", "15:XX", "16:XX", "17:XX", "18:XX", "19:XX", "20:XX", "21:XX", "22:XX", "23:XX"};
default = 12;
};
The following script turns the class into a variable. If run in the editor then P_Hour = 12;. Cause 12 is default. In mp or somewhere where you can specify parameters it get's set to that value. The benefit of this approach I think is that it does not require you to maintain order in the params and you don't do manual indexing into paramsArray. This is the script that does the work:
Code:
if (isNil "paramsArray") then {
if (isClass (missionConfigFile/"Params")) then {
for "_i" from 0 to (count (missionConfigFile/"Params") - 1) do {
_paramName = configName ((missionConfigFile >> "Params") select _i);
_paramValue = getNumber (missionConfigFile >> "Params" >> _paramName >> "default");
call compile format ["%1 = %2", _paramName, _paramValue];
};
};
} else {
for "_i" from 0 to (count paramsArray - 1) do {
_paramName = configName ((missionConfigFile >> "Params") select _i);
_paramValue = paramsArray select _i;
call compile format ["%1 = %2", _paramName, _paramValue];
};
};
Again this might be a special case, however you need some way to tell squint that this variable, even if not recognized, is okay. "I got this one squint".
UTF8... yes the bane of my life. The richtextbox control used in squint doesn't understand UTF-8 and even if it did, handling multi-byte characters through the data-path would be a serious headache for me atm. *Most* non-ascii's should be handled correctly now but I'm prepared to believe there may be a few that escape under certain circumstances. Again, if you can provide a specific example I can take a look.
I'm surprised that .Net does not support UTF all the way. A specific example is this:
In N++:
Code:
/*
Søren Enevoldsen - Muzzleflash - Deadecho
*/
In Squint
Code:
/*
Søren Enevoldsen - Muzzleflash - Deadecho
*/
I noticed that my file somehow got saved with BOM. I changed it back and reloaded in squint it did not make a difference to it's interpretation.
EDIT: The good part is at least is saves the character(s) the same way it loads them. Saving in Squint (with the expanded byte representation) produces the correct result, which I verified by loading in N++ after.
-------------------------

Originally Posted by
JDog
^LOL
Nice I'll be downloading ASAP.
Yeah had a laugh myself when I wrote that 
---------- Post added at 01:04 ---------- Previous post was at 00:49 ----------
Using the preprocessed view seems to FUBAR the syntax highlighting (Notice the T too):