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!![]()
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!![]()
-Rabid Arma 3 fan-
Yes, like millions, I also throw my money at the BIS homepage and it refuses to take it..
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:
Code:// ... if (!isServer) exitWith{}; _vehicle = _this select 0; _delay = _this select 1; _moved = false; _startpos = getpos _vehicle; _startdir = getdir _vehicle; _type = typeof _vehicle;Also when it places privates in front of something it does so without a new line, like so:Code:// ... player action["EJECT", (_this select 0)]; if (vehicle player isKindOf "ParachuteBase") then { _vec = vehicle player;
Becomes:Code:Blah, Blah; Blah;
rather than:Code:private ["_blah"];Blah, Blah; Blah;
Code:private ["_blah"]; Blah, Blah; Blah;
Last edited by callihn; Aug 21 2010 at 05:06.
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
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
5) I can't believe anyone is able to code without courier fontAlthough 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.![]()
Regards
Carl Gustaffa - left this game due becoming Steam Exclusive
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 ,
@MuzzleFlash
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.Hey you forgot to tell that auto-complete detects locals now.
Thanks - fixed :-)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 .
@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
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' !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,
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 ! ;-)Also having problems with these comment examples:
@carlgustuffa
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!)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, dont understand what you mean here - can you explain ?But mouse hoverover doesn't allow me to scroll other windows.
Agreed - will turn off 'auto-word-selection' (or make it an option)3) A little too helpful in trying to help me select things
WIll consider adding settings for these.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.
@Gnat
hpp is already supportedmodel.cfg
xxxx.rvmat
xxxx.hpp
xxxx.pbl
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.
Author of PVPmissionWizard ArmA2FPSAnalyser AddonChecker and ... squint
Tools homepage
Crosseyed and Painless - a blog about my ArmA2 developments
Can do.
model.cfg
xxxx.rvmatPHP Code: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.pblPHP Code: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";
};
layers.cfgPHP Code:class cfg
{
PNGfilename="terrain2.png";
squareSize=20;
originX=0;
originY=0;
minHeight=100;
maxHeight=1200;
};
PHP Code: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}};
}
};
Thanks. So they're all really just cpp files with a different extension ? That makes things pretty simple - will add support today.
it set to CPP already
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...
Yes, this is good way create cpp syntax without unnessesary typing
I can show you more examples if you need it.
btw, its *.hpp file which call from description.ext by
#include "Titles\id.hpp"
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![]()
Last edited by Wass; Aug 21 2010 at 09:25.
No problem - though it took me a while to work out you mean 'character' when you said 'charter'sorry, my english is bad
so i trying type simple words![]()
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...
Anyway, if you say that unquoted paths are legal in cpp files I'll need to look at supporting them.#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
Understood, but what I meant was that there is no difference betweenOriginally 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...
#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 !![]()