Jump to content
Sign in to follow this  
JSD

possible bug with guerilla side

Recommended Posts

I need to check if someone is on the independent side but  side player == GUER  gives an error. After checking in debug I think this might be a bug as it doesn't return anything only for the independent side.
k9AuDNg.png

I was able to work around it fairly easily using  str side player == "GUER"  instead, but if it's actually a bug I should really report it.

Could someone else check if it's actually a bug and not something on my side?

Share this post


Link to post
Share on other sites

Seems to be the same with civilian side

Share this post


Link to post
Share on other sites
2 hours ago, JSD said:

I need to check if someone is on the independent side but  side player == GUER  gives an error

 

You could try checking like this

side player == independent

I hope this helps

Share this post


Link to post
Share on other sites

GUER means exactly...nothing to the Arma 3 engine. resistance or independent on the other hand do mean something

  • Like 1

Share this post


Link to post
Share on other sites

east west resistance civilian sideunknown sideambientlife sidelogic sidefriendly sideenemy

 

^ use those, avoid the blufor/opfor/indepedent/"civ"/"guer" stuff

Share this post


Link to post
Share on other sites
24 minutes ago, killzone_kid said:

GUER means exactly...nothing to the Arma 3 engine. resistance or independent on the other hand do mean something

Ah right, thanks. I assumed it'd be GUER as side does return GUER for independent.

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, killzone_kid said:

GUER means exactly...nothing to the Arma 3 engine. resistance or independent on the other hand do mean something

Not so exactly.

 

4 hours ago, fn_Quiksilver said:

east west resistance civilian sideunknown sideambientlife sidelogic sidefriendly sideenemy

 

^ use those, avoid the blufor/opfor/indepedent/"civ"/"guer" stuff

 

Agree, debug console returns GUER, but it's a string.

test:

side cursorTarget == INDEPENDENT // true if cursorTarget is an indep. unit. same for resistance

str (side cursorTarget) == "GUER" // true also.

Share this post


Link to post
Share on other sites
3 hours ago, pierremgi said:

Not so exactly.

 

Yes so exactly. GUER to the engine is undefined variable, unless defined it is exactly nothing.

Share this post


Link to post
Share on other sites
1 hour ago, killzone_kid said:

 

Yes so exactly. GUER to the engine is undefined variable, unless defined it is exactly nothing.

If you want :e:

Share this post


Link to post
Share on other sites
3 hours ago, killzone_kid said:

 

Yes so exactly. GUER to the engine is undefined variable, unless defined it is exactly nothing.

 

I get that, it's still weird.

//west player
side player //returns WEST
typename side player //returns "SIDE"
side player isEqualTo WEST //returns true

//east player
side player //returns EAST
typename side player //returns "SIDE"
side player isEqualTo EAST //returns true

//independent player
side player //returns GUER
typename side player //returns "SIDE"
side player isEqualTo GUER //ERROR

Doesn't add up for me. Every other side check returns a valid side, except independent units.

So why again is side player returning GUER if it's not a valid side?

Seems like west and east are defined, but guer isn't?

Any specific reason for that?

 

My last ticket about this was closed as "not a bug".

 

Cheers

 

Share this post


Link to post
Share on other sites

As I mentioned, and as specified in BIKI, GUER (like returned in console) is a string, like CIV for civilian, coming from somewhere in Arma's engine, even if not defined so "exactly nothing" as asserted by KK.

 

Share this post


Link to post
Share on other sites
8 minutes ago, pierremgi said:

As I mentioned, and as specified in BIKI, GUER (like returned in console) is a string, like CIV for civilian, coming from somewhere in Arma's engine, even if not defined so "exactly nothing" as asserted by KK.

 

It's not a string, otherwise typename side player would return "STRING".

It's just an undefined side or whatever, but certainly not a string.

 

Cheers

Share this post


Link to post
Share on other sites

bah!    str(side cursorTarget) == "GUER" can return true, and I gave you a link in BIKI where strings are mentioned. The fact is that I have no certitude. Just some facts easy to read or test.

Just 2 of the 10 sides are "returning" "what is similar to" a "string" by format ["%1" side _x]:

"WEST" for WEST and "EAST"  for EAST.

The 8 others are "returning" "something similar to" a "string" different of the "typo" of the side. "CIV" for CIVILIAN, "AMBIANT LIFE" for sideAmbiantLife, "GUER" for RESISTANCE, etc.

So, probably, the debug console watch returns the "string" value, without quote, like in some hint format.

 

Btw, there are 2 pages in BIKI concerning side, with the same URL to copy/paste! To reach my reference click on side from the main category scripting commands. Thanks!

Share this post


Link to post
Share on other sites
31 minutes ago, pierremgi said:

bah!    str(side cursorTarget) == "GUER" can return true, and I gave you a link in BIKI where strings are mentioned. The fact is that I have no certitude. Just some facts easy to read or test.

Just 2 of the 10 sides are "returning" "what is similar to" a "string" by format ["%1" side _x]:

"WEST" for WEST and "EAST"  for EAST.

The 8 others are "returning" "something similar to" a "string" different of the "typo" of the side. "CIV" for CIVILIAN, "AMBIANT LIFE" for sideAmbiantLife, "GUER" for RESISTANCE, etc.

So, probably, the debug console watch returns the "string" value, without quote, like in some hint format.

 

Btw, there are 2 pages in BIKI concerning side, with the same URL to copy/paste! To reach my reference click on side from the main category scripting commands. Thanks!

 

Maybe I'm missing your point but:

str(side cursorTarget) == "GUER"

compares string to string

side cursortarget returns GUER, which is not a string.

Hence using typename side cursortarget returns "SIDE".

Which shows that GUER is defined as datatype side, it just doesn't return any valid side whatsoever.

 

No such thing as "what is similar to a string", the data type returned is either a string or not, in case of GUER it's typename "SIDE".

They return GUER, CIV, not "GUER" or "CIV".

 

Cheers

 

 

Share this post


Link to post
Share on other sites
1 hour ago, Grumpy Old Man said:

 

Maybe I'm missing your point but:

str(side cursorTarget) == "GUER"

compares string to string

side cursortarget returns GUER, which is not a string.

Hence using typename side cursortarget returns "SIDE".

Which shows that GUER is defined as datatype side, it just doesn't return any valid side whatsoever.

 

No such thing as "what is similar to a string", the data type returned is either a string or not, in case of GUER it's typename "SIDE".

They return GUER, CIV, not "GUER" or "CIV".

 

Cheers

 

 

 

Grumpy, side player does not return GUER or WEST or EAST. It returns a type Side which when displayed is represented with the text GUER, WEST or EAST.  Small but important difference. The engine still views and handles the return like a type Side. GUER does not exist as anything other than a text representation of the side. Same technically goes for EAST and WEST but for those a matching command/engine variable happens to exists.

 

It really boils down to inconsistent naming standards but I'd say that's a trademark for earlier BIS games. :f: I prefer using the newer blufor, opfor and independent for this very reason since they are easier to differentiate. Hell I'd even go so far as to say this kind of conversation is why they were introduced. 

 

Hope that makes more sense.

  • Like 3

Share this post


Link to post
Share on other sites
35 minutes ago, mrcurry said:

 

Grumpy, side player does not return GUER or WEST or EAST. It returns a type Side which when displayed is represented with the text GUER, WEST or EAST.  Small but important difference. The engine still views and handles the return like a type Side. GUER does not exist as anything other than a text representation of the side. Same technically goes for EAST and WEST but for those a matching command/engine variable happens to exists.

 

Probably because in OFP it was WEST, EAST and GUER. I guess they are left overs as the RV4 engine has developed over the years. 

  • Like 1

Share this post


Link to post
Share on other sites
4 hours ago, Grumpy Old Man said:

 

Maybe I'm missing your point but:

str(side cursorTarget) == "GUER"

compares string to string

side cursortarget returns GUER, which is not a string.

Hence using typename side cursortarget returns "SIDE".

Which shows that GUER is defined as datatype side, it just doesn't return any valid side whatsoever.

 

No such thing as "what is similar to a string", the data type returned is either a string or not, in case of GUER it's typename "SIDE".

They return GUER, CIV, not "GUER" or "CIV".

 

Cheers

 

 

 

Well "what is similar to a string" was ironic because, I can't say it's a string without being fired! GUER is a result, the same as you can read when you run:

hint format ["%1", "GUER"] !  That's all. Run hint format ["%1", "Hello"] , as well. You'll read hello and not "hello".

But for pratical reason, we, and BIKI, write "GUER" in the topic and the page. Did you succeed in reading the BIKI page for side command from the the main category scripting commands?

 

The important thing, if I'm right, is not here! GUER , CIV are strings, and str(side something) == "CIV" is as workable as side something == CIVILIAN.

The important thing is the watch console is probably returning, always,  format ["%1", result] instead of result itself.

 

 

Share this post


Link to post
Share on other sites
20 minutes ago, pierremgi said:

 

Well "what is similar to a string" was ironic because, I can't say it's a string without being fired! GUER is a result, the same as you can read when you run:

hint format ["%1", "GUER"] !  That's all. Run hint format ["%1", "Hello"] , as well. You'll read hello and not "hello".

But for pratical reason, we, and BIKI, write "GUER" in the topic and the page. Did you succeed in reading the BIKI page for side command from the the main category scripting commands?

 

The important thing, if I'm right, is not here! GUER , CIV are strings, and str(side something) == "CIV" is as workable as side something == CIVILIAN.

The important thing is the watch console is probably returning, always,  format ["%1", result] instead of result itself.

 

 

Yes, I read the wiki entry.

You seem to misinterpret it, since the side command returns side, and never ever string in any case.

As stated in the Syntax and Alternative Syntax descriptions.

This command never returns strings.

When you're using str side player then you turn the side into a string, same with format ["%1", side player] will be of datatype string.

 

You can check for the data type using typeName, which never returns "STRING" when checking for a units side.

Feel free to test.

 

Also read the last comment by IT07 on the side wiki entry.

 

Cheers

Share this post


Link to post
Share on other sites
13 minutes ago, Grumpy Old Man said:

Yes, I read the wiki entry.

You seem to misinterpret it, since the side command returns side, and never ever string in any case.

As stated in the Syntax and Alternative Syntax descriptions.

This command never returns strings.

When you're using str side player then you turn the side into a string, same with format ["%1", side player] will be of datatype string.

 

You can check for the data type using typeName, which never returns "STRING" when checking for a units side.

Feel free to test.

 

Also read the last comment by IT07 on the side wiki entry.

 

Cheers

I never ever wrote side command returned a string! What are you taking me for???? And, probably due to my bad English, you failed to understand what I said since the start. GUER is the returned string value in format ["%1",..] context. I'm fed up with such bad faith!

Share this post


Link to post
Share on other sites
14 minutes ago, pierremgi said:

I never ever wrote side command returned a string! What are you taking me for????

 

 

14 hours ago, pierremgi said:

Agree, debug console returns GUER, but it's a string.

 

I'm confused.

 

Cheers

Share this post


Link to post
Share on other sites

Yes , debug console (watch lines) , as I said, and it's perhaps an interesting thing, seems to return in any case, any code, the format ["%1", result] !

Share this post


Link to post
Share on other sites
23 minutes ago, pierremgi said:

Yes , debug console (watch lines) , as I said, and it's perhaps an interesting thing, seems to return in any case, any code, the format ["%1", result] !

 

My point still stands, maybe I'm misunderstanding what you're trying to say.

The debug console monitor doesn't return a string, it returns a side. It says GUER and not "GUER".

 

lLMYEOZ.png

 

No idea how else I could bring this to you.

 

Cheers

Share this post


Link to post
Share on other sites

The watch lines are always strings on my mind. already returning format ["%1", result] instead of result itself.

In the console or elsewhere, if you run hint format ["%1",side player], you'll obtain GUER, ...WEST,EAST, CIV... (all stringed value as said in BIKI but without quote)

Same for side player in watch line.

 

if you run: hint format  ["%1", typeName side player].. You'll obtain SIDE, not "SIDE"  as in your example.

same for hint format ["%1", "hello"], definitely a string but returning no quote. That's the normal  behaviour for any hint for simple string.

 

On the other hand, watch line returns "SIDE" for the typeName, with quotes. there is no difference between typeName ... and format ["%1", typename..] in these lines. Probably because already wrapped with format context of the lines.

So, I guess the command are always working fine and do their job. A side is a side and a typeName of a side is SIDE, but you can't read directly the result in watch lines, like you catch it in a script.

You're reading something like format ["%1", side player] or format ["%1", typeName side player]. The weird thing, and I'm not sure there is another example of that, for sides: side player and  format ["%1", side player] are totally different for reading.

 

So, to conclude on what I think, not a truth, just an idea, GUER,CIV are strings, defined somewhere in an hpp,  not sides but linked to them.

 

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  

×