sbsmac 0 Posted August 20, 2010 Whenever you move the caret left and it "passes" through non-whitespace a "%" appears as a viable autocompletion This was a bug caused by the fact that the keycode for left-arrow turns into '%' when cast into a char in combination with the fact that the dictionary for the autocomplete contained ALL keyword/operators rather than just the alphabetic ones. Anyway, fixed now :-) WRT ClickOnce... Wikipedia covers it fairly well http://en.wikipedia.org/wiki/ClickOnce and MuzzleFlash also explained it in detail so I don't have a lot to add but here's the way it works.... When I create the application, it is split into a small 'setup' file and then the main bulk of the application. The setup file contains a link (URL) to the location of the main application so it can be stored it a completely different location. (You can even email round the setup file or use a really old version and it will still work.) When you run the setup file it looks in the expected location for the application and uses some metadata to figure out which is the latest version it needs to download in order to install it. Once you have installed the application it contains some similar code to the original setup file. Every time you start it, it briefly checks the original download location to see whether a newer version is available and installs it if one is. Apart from that it is non-intrusive and does not sit in the background checking periodically. Hope that explains it. Share this post Link to post Share on other sites
cyop 10 Posted August 20, 2010 sbsmac, Thank you very much for Squint (and to those that helped, and are helping you). I like it. Although, I am not 'good enough' with scripting to be able to use it fully. I loaded two files that I have been working on and was surprised to discover I had no mistakes (except it helping me set private variables). However, I loaded a file I am using from someone else, and it had multiple 'problems', and I just could not figure out how to fix them. Bummer. Sooo, are we able to use this thread to post and get help with 'stuff'? Thanks again, 'you guys', and keep up the great work. :) Share this post Link to post Share on other sites
sbsmac 0 Posted August 20, 2010 Yes, please do post here for help. There is also some (incomplete) documentation on typical errors at https://sites.google.com/site/macsarmatools/squint/errors which may be a helpful first step. Share this post Link to post Share on other sites
callihn 10 Posted August 20, 2010 (edited) CTRL-C, CTRL-V, CTRL-X all work in the code-window :-) Ohh I know that but then I remember monocrome monitors too. ;) Noticed an update today and haven't had a chance to use it yet, but I also want to mention in case you haven't fixed it that when I have for example: // Author private .... or //Author if (!isServer)..... It says it wants to place all of it with the new private, comment included. Gone to play with the latest version, keep up the good work. BTW, do we always get the latest version from that original link? Edited August 21, 2010 by callihn Share this post Link to post Share on other sites
sbsmac 0 Posted August 20, 2010 Well spotted -that's a bug. >BTW, do we always get the latest version from that original link? You should never need to manually update the program since it checks for updates every time you run it and updates itself if a newer version is available. ---------- Post added at 11:36 PM ---------- Previous post was at 10:36 PM ---------- Ok, bug with comment being replaced by 'private' is now fixed. Also auto-completion now works with local variables (only those that are mentioned in the current scope though - that's a 'feature'). It's dreadfully slow at the moment since it's using some very inefficient brute-force algorithms. I'll need to tidy it up when I add support for function names. Share this post Link to post Share on other sites
Muzzleflash 111 Posted August 20, 2010 I tried making a user on devheaven however i'm unable to login. So I'll post it here: Feature Request - Selecting/Marking a word (non-whitespace-separated text) should highlight matching word in document. Minor Bug - Double clicking a word selects an extra space. Underscore seems to functions as widespace regarding double clicking thus local won't get completely selected. Share this post Link to post Share on other sites
d3lta 10 Posted August 20, 2010 (edited) Fantastic!! Amazing!!!! Supreme!!! The best!!! Thanks sbsmac!!!!! :D:D:D:yay: A Question: is UTF-8 support ok? Edited August 20, 2010 by D3lta Share this post Link to post Share on other sites
sbsmac 0 Posted August 20, 2010 One last update before bed.... auto-complete is now much more efficient and now implements standard unix-shell type tab-completion. Ie, if you type 'pl' auto-complete will list all commands starting with 'pl' but since they all actually start with 'play' you can press tab to fill in the 'ay' automatically. Reminder - you need to turn on auto=complete from the 'Advanced' menu if you want to play with it. @MuzzleFlash - yep there's already a bug open about the double-clicking. @D3lta - UTF-8 files (with or without BOM) can be loaded and saved out again without any character-mangling that I've noticed although as has been noted, some non-ascii characters may not display as you would have expected. Share this post Link to post Share on other sites
Muzzleflash 111 Posted August 21, 2010 Hey you forgot to tell that auto-complete detects locals now. :) However, it throws exceptions at me like a mad man again now. Try writing "net" on an empty line. I guarantee you are not allowed!. :( Key not in dictionary error. Better catch that one ;). Share this post Link to post Share on other sites
Wass 1 Posted August 21, 2010 (edited) Errors when i use code like this in description.ext class CfgSounds { sounds[] = {}; #define s(a) \ class s##a \ { \ name = "sound"; \ sound[] = {\sound\s##a.ogg, db+0, 1.0}; \ titles[] = {0, $STR_s##a}; \ }; \ s(1); s(2); s(3); s(4); s(5); s(6); }; or this one class CfgIdentities { #define ID(x, nm, fc, gl, sp)\ class ##x \ {\ name = ##nm;\ face = ##fc;\ glasses= ##gl;\ speaker = ##sp;\ pitch = 1.000000;\ };\ ID(Boevik, "$STR_Boevik", "Face74", "none", "Male03RU") ID(Pl1, "$STR_Pl1", "Face23_camo3", "none", "Male02RU") ID(Pl2, "$STR_Pl2", "Face67_camo3", "none", "Male05RU") ID(Pl3, "$STR_Pl3", "Face12_camo3", "none", "Male03RU") ID(Pl4, "$STR_Pl4", "Face49_camo3", "none", "Male04RU") ID(Pl5, "$STR_Pl5", "Face90_camo3", "none", "Male01RU") ID(Pl6, "$STR_Pl6", "Face62_camo3", "none", "Male05RU") ID(Pilotvt, "$STR_Pilotvt", "Face25", "none", "Male02RU") ID(cop, "$STR_cop", "Face90", "none", "Male02RU") ID(drv, "$STR_man", "Face12", "none", "Male02RU") }; it write me missing } before end of file in game it work well. Edited August 21, 2010 by Wass Share this post Link to post Share on other sites
Scrub 0 Posted August 21, 2010 Thank you sbsmac! Your GUI took away the vast majority of my stupid errors (significant to say the least) and is teaching me the way syntax SHOULD be done. Thanks! I now have the gumption to code again! :D Share this post Link to post Share on other sites
callihn 10 Posted August 21, 2010 (edited) Well, sadly when it was all said and done I broke more than I could ever fix, it seems some things should not be in a private despite what Squint thinks, just try grabbing a domination mission and running it through, particularly TeamStatusDialog.sqf was broken in this manner. Look at Bushlurker's Panthera Domination port, which I'm trying to modernize and have some additions to, I think it has the ability to help you fine tune your app, if it could go through there and fix things without breaking them it should work on anything. Guess it's not quite dummy proof yet, but a great tool for the rest, hope it gets there someday and it looks like it is heading there fast, meanwhile I'm pretty sure you'll be able to get things in line by running it through that mission. Also having problems with these comment examples: // ... if (!isServer) exitWith{}; _vehicle = _this select 0; _delay = _this select 1; _moved = false; _startpos = getpos _vehicle; _startdir = getdir _vehicle; _type = typeof _vehicle; // ... player action["EJECT", (_this select 0)]; if (vehicle player isKindOf "ParachuteBase") then { _vec = vehicle player; Also when it places privates in front of something it does so without a new line, like so: Blah, Blah; Blah; Becomes: private ["_blah"];Blah, Blah; Blah; rather than: private ["_blah"]; Blah, Blah; Blah; Edited August 21, 2010 by callihn Share this post Link to post Share on other sites
Wass 1 Posted August 21, 2010 Also when it places privates in front of something it does so without a new line, like so: Blah, Blah; Blah; Becomes: private ["_blah"];Blah, Blah; Blah; rather than: private ["_blah"]; Blah, Blah; Blah; it does not matter, because charter ";" here. It saparate commands in line. Share this post Link to post Share on other sites
CarlGustaffa 4 Posted August 21, 2010 Well I just had a brief scan through my own Domination modification. Although there were lots of "false positives", warnings that can safely be ignored, I sure had my share of facepalm moments. More than expected, that's for sure. A couple of issues with the application: 1) Auto-update without user control - huuuge no no from me. Had to block it on the firewall, which results in a very slow startup. Paranoia is a skill :p 2) Installed (incl. Net4) a few days ago, didn't reboot until today. So I don't have the latest version yet (will do soon, I just ran a couple of tests). But mouse hoverover doesn't allow me to scroll other windows. 3) A little too helpful in trying to help me select things (lmb dragging text, i.e. strings, private declared etc). In some cases I'm completely unable to select what I want, application overrides me completely and select either less or more. 4) Would be nice to be able to set the white colors in the other windows to a user color as well. Especially now that I'm dead tired :p 5) I can't believe anyone is able to code without courier font :D Although Verdana is better than Arial, nothing really beats courier. Would be nice if I could set that also for the other windows. "_j" (that's a 'J') doesn't really show very well. Lack of courier is my biggest gripe with the fsm editor as well btw. Squint is a major help in finding errors - it found quite a few I must say I was shocked it was able to find (nice tracing through files) - but I think I will stick with UltraEdit for the main typing part. Then just switch back and forth to look for the "not so obvious"... Err, and the obvious. :) Share this post Link to post Share on other sites
[aps]gnat 28 Posted August 21, 2010 Lovely looking tool mate, but seems; model.cfg xxxx.rvmat xxxx.hpp xxxx.pbl get no mention. If I'm going to have a one-stop does-it-all text edit tool, it would be nice if it covered ALL files we addon makers play with in ArmAII/OA. Sure, there very little syntax in model.cfg for example, but a basic C++ display helps with formating and finding those lost { " or , Share this post Link to post Share on other sites
sbsmac 0 Posted August 21, 2010 @MuzzleFlash Hey you forgot to tell that auto-complete detects locals now. I'm sure I mentioned that in one of the earlier posts! Anyway, it detects _in_scope_ locals rather than all locals in the file (this is a deliberate feature). I think there is something a little odd about the very top file-level scope detection - need to check this. However, it throws exceptions at me like a mad man again now. Try writing "net" on an empty line. I guarantee you are not allowed!.Key not in dictionary error. Better catch that one . Thanks - fixed :-) @Wass Could you check that 'CPP" grammar is being used (Right-click on the name of the file in the file-list and go to "select grammar->CPP" in the pop-up menu. After you have done that, you will still see some errors:- In your first example, squint doesn't like the lines like sound[] = {\sound\s1a.ogg since it thinks that \sound\s1a.ogg should be a number or variable name and therefore should not contain characters like '\' or '.'. Shouldn'tthis really be quoted... "\sound\s1a.ogg" ? To be honest I'm really amazed if arma does accept this as you have written it but I'm not an expert on configs so if you can confirm that this is really legal input I'll add support for it. In your second example you've found a minor bug in the squint preprocessor which seems to be failing to remove the last line-continuation slash from the macro expansoion. :-) I'll look at this today but in the meantime you can fix those errors by removing the (unneeded) slash at the end of the macro definition. BTW, why do people use '##' when they are not actually _pasting_ macro arguments ? "class ##x" in your example could just as well be written as "class x" ! @callihn Well, sadly when it was all said and done I broke more than I could ever fix, it seems some things should not be in a private despite what Squint thinks, No tool has yet been invented that can psychically deduce the intent of the original author and tell true errors from 'funny code' ! All squint can do is warn you of potential problems and recommend ways it might be fixed. Sometimes people have written scripts in the full knowledge that 'local' variables will always be present from the calling context so if you add a private statement then you will remove access to those variables which is probably what is happening in your case. Like I say, squint is a tool that can help you identify errors but it is unwise to go through your entire project blindly clicking 'fix' ! Also having problems with these comment examples: Drat - there must be another way through the codepath I haven't fixed up. Thanks - will look at that. The indent/formatting for new private arrays is already in the issue tracker as a known bug. As Wass says, syntactically it makes no difference even if it looks ugly. Just be grateful you don't have to type those arrays by hand ! ;-) @carlgustuffa 1) Auto-update without user control - huuuge no no from me. Had to block it on the firewall, which results in a very slow startup. Paranoia is a skill Sorry but I have no plans to change this since it is hugely more convenient for me to know that all users are on the latest version. If you want to really paranoid you've probably failed at the first hurdle by installing an app from some guy you only know from some dodgy gaming forum ! :-P (J/k -squint does not contain any malware/viruses/spyware/rootkits or anything else!) But mouse hoverover doesn't allow me to scroll other windows. Sorry, dont understand what you mean here - can you explain ? 3) A little too helpful in trying to help me select things Agreed - will turn off 'auto-word-selection' (or make it an option) 4) Would be nice to be able to set the white colors in the other windows to a user color as well. Especially now that I'm dead tired 5) I can't believe anyone is able to code without courier font Although Verdana is better than Arial, nothing really beats courier. Would be nice if I could set that also for the other windows. "_j" (that's a 'J') doesn't really show very well. Lack of courier is my biggest gripe with the fsm editor as well btw. WIll consider adding settings for these. @Gnat model.cfgxxxx.rvmat xxxx.hpp xxxx.pbl hpp is already supported Could you send me or point me towards examples of the other formats ? Assuming that BIS haven't invented another grammar type for these, and have re-used cpp type structured grammar then support should be quite straightforward. Share this post Link to post Share on other sites
[aps]gnat 28 Posted August 21, 2010 Could you send me or point me towards examples of the other formats ? Can do. model.cfg class CfgSkeletons { class default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class GNT_FSFBones: default { isDiscrete=1; skeletonInherit = ""; skeletonBones[]= { "ZL1","", "ZL2","", "CL1","", "CL2","" }; }; }; class CfgModels { class Default { sectionsInherit=""; sections[] = {}; skeletonName = ""; }; class allvehicle : Default { sectionsInherit=""; sections[] = {}; skeletonName = ""; }; class Ship : allvehicle { sectionsInherit=""; sections[] = {"otocvez","otochlaven","radar","kompas","fuel","hodinova","minutova","mph","rpm","rpm2","main1turret","main1gun"}; skeletonName = ""; }; class GNTFSF : Ship { skeletonName = "GNT_FSFBones"; sectionsInherit = "Ship"; sections[] = {"ZL1","ZL2","CL1","CL2"}; class Animations { class ZL1 { type="rotation"; initPhase=0; source = "FUser1"; animPeriod=0.1; sourceAddress = "clamp"; selection="ZL1"; axis="axis_swt"; minValue = 0; maxValue = 1; angle0=0; angle1="rad -70"; }; class ZL2 { type="rotation"; initPhase=0; source = "FUser2"; animPeriod=0.1; sourceAddress = "clamp"; selection="ZL2"; axis="axis_swt"; minValue = 0; maxValue = 1; angle0=0; angle1="rad -70"; }; class CL1 { type="rotation"; initPhase=0; source = "FUser3"; animPeriod=0.1; sourceAddress = "clamp"; selection="CL1"; axis="axis_swt"; minValue = 0; maxValue = 1; angle0=0; angle1="rad -70"; }; class CL2 { type="rotation"; initPhase=0; source = "FUser4"; animPeriod=0.1; sourceAddress = "clamp"; selection="CL2"; axis="axis_swt"; minValue = 0; maxValue = 1; angle0=0; angle1="rad -70"; }; }; }; }; xxxx.rvmat ambient[] = {1, 0.999529, 0.999529, 1}; diffuse[] = {1, 0.999529, 0.999529, 1}; forcedDiffuse[] = {0, 0, 0, 0}; emmisive[] = {0, 0, 0, 0}; specular[] = {0.523961, 0.523961, 0.523961, 0}; specularPower = 150; PixelShaderID = "Super"; VertexShaderID = "Super"; class Stage1 { texture = "ca\air_e\an2\data\an2_1_nohq.paa"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class Stage2 { texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class Stage3 { texture = "#(argb,8,8,3)color(0,0,0,0,MC)"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class Stage4 { texture = "#(argb,8,8,3)color(1,1,1,1,AS)"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class Stage5 { texture = "ca\air_e\an2\data\an2_1_smdi.paa"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class Stage6 { texture = "#(ai,64,64,1)fresnel(0.36,0.53)"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class Stage7 { texture = "ca\data\env_land_co.paa"; uvSource = "tex"; class uvTransform { aside[] = {1, 0, 0}; up[] = {0, 1, 0}; dir[] = {0, 0, 0}; pos[] = {0, 0, 0}; }; }; class StageTI { texture = "ca\air_e\an2\data\an2_1_ti_ca.paa"; }; xxxx.pbl class cfg { PNGfilename="terrain2.png"; squareSize=20; originX=0; originY=0; minHeight=100; maxHeight=1200; }; layers.cfg class Layers { class desertcliffs { texture = "gnt_sands\data\desertcliffs_detail_co.png"; material= "gnt_sands\data\desertcliffs.rvmat"; }; class desert1 { texture = "gnt_sands\data\desert1_detail_co.png"; material= "gnt_sands\data\desert1.rvmat"; }; class desertrock3 { texture = "gnt_sands\data\desertrock3_detail_co.png"; material= "gnt_sands\data\desertrock3.rvmat"; }; class deepdesert { texture = "gnt_sands\data\deepdesert_detail_co.png"; material= "gnt_sands\data\deepdesert.rvmat"; }; }; class Legend { picture= "gnt_sands\Source\mapLegend.png"; class Colors { /// color names should correspond to surface layer names deepdesert[]= {{1,1,1}}; desert1[]= {{255,115,0}}; desertcliffs[]= {{255,0,0}}; desertrock3[]= {{0,0,255}}; } }; Share this post Link to post Share on other sites
sbsmac 0 Posted August 21, 2010 Thanks. So they're all really just cpp files with a different extension ? That makes things pretty simple - will add support today. Share this post Link to post Share on other sites
Wass 1 Posted August 21, 2010 (edited) @Wass Could you check that 'CPP" grammar is being used (Right-click on the name of the file in the file-list and go to "select grammar->CPP" in the pop-up menu. it set to CPP already sound[] = {\sound\s1a.oggsince it thinks that \sound\s1a.ogg should be a number or variable name and therefore should not contain characters like '\' or '.'. Shouldn'tthis really be quoted... "\sound\s1a.ogg" ? no,no.. "a" - its just a "end charter"... that mean i can insert charter (numbers) after "s" and whan it over, string will close... s1(close string charter) => s1, use \sound\s1.ogg s2(close string charter) => s2, use \sound\s2.ogg s3(close string charter) => s3, use \sound\s3.ogg s4(close string charter) => s4, use \sound\s4.ogg and something like this... To be honest I'm really amazed if arma does accept this as you have written it but I'm not an expert on configs so if you can confirm that this is really legal input I'll add support for it. Yes, this is good way create cpp syntax without unnessesary typing :) I can show you more examples if you need it. In your second example you've found a minor bug in the squint preprocessor which seems to be failing to remove the last line-continuation slash from the macro expansoion. :-) I'll look at this today but in the meantime you can fix those errors by removing the (unneeded) slash at the end of the macro definition. btw, its *.hpp file which call from description.ext by #include "Titles\id.hpp" BTW, why do people use '##' when they are not actually _pasting_ macro arguments ? "class ##x" in your example could just as well be written as "class x" ! no, "x" - close charter, but i use a different names here, like Boevik, Pl1-Pl5, Pilotvt, cop, drv... sorry, my english is bad :) so i trying type simple words :) Edited August 21, 2010 by Wass Share this post Link to post Share on other sites
sbsmac 0 Posted August 21, 2010 sorry, my english is badso i trying type simple words No problem - though it took me a while to work out you mean 'character' when you said 'charter' :) Sorry - the 'a' in sound[] = {\sound\s1a.ogg was a cut-and-paste mistake by me. What I was really asking was why (when you look in preprocessed view) sound[] = {\sound\s1.ogg, ... was not sound[] = {"\sound\s1.ogg", ... Alternatively, why not use macros like this... #define QUOTEPATH(X) #X #define s(A) \ class s##A \ { \ name = "sound"; \ sound[] = {QUOTEPATH(\sound\s##A.ogg), db+0, 1.0}; \ titles[] = {0, $STR_s##A}; \ }; \ class CfgSounds { sounds[] = {}; s(1); etc Anyway, if you say that unquoted paths are legal in cpp files I'll need to look at supporting them. :) Originally Posted by sbsmac View Post BTW, why do people use '##' when they are not actually _pasting_ macro arguments ? "class ##x" in your example could just as well be written as "class x" ! no, "x" - close charter, but i use a different names here, like Boevik, Pl1-Pl5, Pilotvt, cop, drv... Understood, but what I meant was that there is no difference between #define M(X) ##X and #define M(X) X '##' is just a 'token-pasting' operator - if there's nothing for it to paste on the left-hand side then you might as well leave it out ! :) Share this post Link to post Share on other sites
Wass 1 Posted August 21, 2010 (edited) Alternatively, why not use macros like this... oh, i see. i newer use way like this, actually, im not expert :) Anyway, if you say that unquoted paths are legal in cpp files I'll need to look at supporting them. :) good to hear :) Understood, but what I meant was that there is no difference between #define M(X) ##X and #define M(X) X '##' is just a 'token-pasting' operator - if there's nothing for it to paste on the left-hand side then you might as well leave it out ! :) sure :) This metod work in *.bikb files to here is example use class Sentences { #define TEXT(I,N) \ class Player_##I##_##N \ { \ text = $STR_Player_##I##_##N##; \ speech[] = {\sound\PLAYER\Player_##I##_##N##.ogg}; \ class Arguments {}; \ }; TEXT(Tr1,1) TEXT(Tr2,1) TEXT(Tr2,2) TEXT(Tr2,3) TEXT(Tr1,01) TEXT(Tr1,02) TEXT(Tr1,03) TEXT(Tr1,04) TEXT(Tr1,05) TEXT(Tr1,06) TEXT(Vid1,1) TEXT(Vid1,2) TEXT(Vid1,3) TEXT(Vid2,1) TEXT(Vid2,2) }; class Arguments{}; class Special{}; startWithVocal[] = {hour}; startWithConsonant[] = {europe, university}; we can use some names for sound class CfgSounds { sounds[] = {}; #define Tarasov(a) \ class Tarasov##a \ { \ name = "sound"; \ sound[] = {Tarasov##a.ogg, db+0, 1.0}; \ titles[] = {0, $STR_Tarasov##a}; \ }; \ Tarasov(1); Tarasov(2); Tarasov(3); #define Kopitkin(b) \ class Kopitkin##b \ { \ name = "sound"; \ sound[] = {Kopitkin##b.ogg, db+0, 1.0}; \ titles[] = {0, $STR_Kopitkin##b}; \ }; \ Kopitkin(1); Kopitkin(2); Kopitkin(3); }; for exampe - here is my cfgSound from description.ext class CfgSounds { sounds[] = {}; #define s(a) \ class s##a \ { \ name = "sound"; \ sound[] = {\sound\s##a.ogg, db+0, 1.0}; \ titles[] = {0, $STR_s##a}; \ }; \ s(1); s(2); s(3); s(4); s(5); s(6); #define beep(b) \ class beep##b \ { \ name = "sound"; \ sound[] = {\sound\beep##b.ogg, db+0, 1.0}; \ titles[] = {}; \ }; \ beep(1); beep(2); beep(3); #define intro(c) \ class intro##c \ { \ name = "sound"; \ sound[] = {\sound\intro\intro##c.ogg, db+0, 1.0}; \ titles[] = {0, $STR_intro##c}; \ }; \ intro(1); intro(2); intro(3); intro(4); intro(5); intro(6); intro(7); intro(8); intro(9); intro(10); intro(11); intro(12); intro(13); intro(14); intro(15); intro(16); intro(17); class mi24 { name = "mi24"; sound[] = {"\sound\mi24.ogg", db-6, 1.0}; titles[] = {}; }; class Video_2_9 { name = "Video_2_9"; sound[] = {"\sound\JACKAL\Video_2_9.ogg", db-6, 1.0}; titles[] = {0, $STR_Video_2_9}; }; class Video_2_10 { name = "Video_2_10"; sound[] = {"\sound\JACKAL\Video_2_10.ogg", db-6, 1.0}; titles[] = {0, $STR_Video_2_10}; }; class Player_Vid2_1 { name = "Player_Vid2_1"; sound[] = {"\sound\PLAYER\Player_Vid2_1.ogg", db-6, 1.0}; titles[] = {0, $STR_Player_Vid2_1}; }; class Player_Vid2_2 { name = "Player_Vid2_1"; sound[] = {"\sound\PLAYER\Player_Vid2_2.ogg", db-6, 1.0}; titles[] = {0, $STR_Player_Vid2_2}; }; }; btw, we can set sound parametrs class CfgSounds { sounds[] = {}; #define zvuk(x, ImyaZvuka, OggZvuka, perem1, perem2, ImyaStringa)\ class ##x \ {\ name = ##ImyaZvuka;\ sound[] = {##OggZvuka, db + ##perem1, ##perem2};\ titles[] = {0, $##ImyaStringa}; \ };\ zvuk(sound1, Sound1, "sound1.ogg", 1, 0, STR_sound1) zvuk(sound2, Sound2, "sound2.ogg", 1, 0, STR_sound2) zvuk(sound3, Sound3, "sound3.ogg", 1, 0, STR_sound3) Edited August 21, 2010 by Wass Share this post Link to post Share on other sites
sbsmac 0 Posted August 21, 2010 Sure, but the last one would work exactly the same if you just wrote... class CfgSounds { sounds[] = {}; #define zvuk(x, ImyaZvuka, OggZvuka, perem1, perem2, ImyaStringa)\ class x \ {\ name = ImyaZvuka;\ sound[] = {OggZvuka, db + perem1, perem2};\ titles[] = {0, $##ImyaStringa}; \ };\ zvuk(sound1, Sound1, "sound1.ogg", 1, 0, STR_sound1) zvuk(sound2, Sound2, "sound2.ogg", 1, 0, STR_sound2) zvuk(sound3, Sound3, "sound3.ogg", 1, 0, STR_sound3) since macro argument substitutions are carried out before pasting :) Share this post Link to post Share on other sites
Wass 1 Posted August 21, 2010 its just a sample... from our forum. i never use it, write my self for my missions, just base on it. I very grateful to our scripter, Lost [OTK Team] who teach us this method :) Share this post Link to post Share on other sites
Li0n 10 Posted August 21, 2010 sbsmac What I`ve done wrong? Share this post Link to post Share on other sites
sbsmac 0 Posted August 21, 2010 That doesn't look like the squint setup utility to me. The fact that the 'Cancel' button is labelled 'Chancel' looks very odd. Are you sure you're setup.exe hasn't been tampered with? Share this post Link to post Share on other sites