Concatenating Booleans crashes the game

immor7alimmor7al Member Posts: 8
edited November -1 in Tech Support
I'm not a programmer by study, but I was under the impression that concatenating would work with anything. But, if I concatenate a boolean, my game crashes. Concatenating integer-type variables is fine.

Can someone enlighten me?


  • RattleheadRattlehead Member Posts: 485
    I think you need to provide a bit more detail...

    First off, why are you trying to concatenate two boolean variables?

    Are you trying to do this in a rule?
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,597
    If you are trying this in a Rule, I can't see why it would crash. Putting When All conditions are valid: Attribute A =false; Attribute B=true; Attribute C=false, etc., as an example, then run the behaviours, should work...

    If that's the sort of thing your doing, then that resulting in a bug has surely got to be a bug somewhere...

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain

  • immor7alimmor7al Member Posts: 8
    I make a new actor, give it a "Display Text" behavior. I open the expression editor in this behavior and type:


    I hit the green check mark. I put the actor on the stage. When I preview it, the game doesn't run.

    However, if I type something in the "Display Text" behavior's expression editor like this:


    ...the game runs fine.

    Sorry for any confusion, like I said I'm not a programmer. And now I know concatenating has more meanings than one.
  • RattleheadRattlehead Member Posts: 485
    Ahhh... so you are trying to display whether a value is true or false. I haven't tried in the latest build that was uploaded last night but I have done it before without prefixing with the "showboolean:" text you have.

    Try taking that part out and see if it still displays the value of the variable. It should.
  • immor7alimmor7al Member Posts: 8
    Yeah, displaying booleans work fine with the "Display Text" behavior if I don't use that syntax. So it would just be: game.boolean

    But, if I wanted to concatenate an integer-type variable and a boolean-type variable in the same "Display Text" behavior, it won't work.

    So, I've also tried it like this:


    ...but, instead of displaying the variables value (which should be just true or false), it displays its ID. I think it displayed something like (var[game.boolean:id3519123]) ...something weird like that.
  • RattleheadRattlehead Member Posts: 485
    Yeah, that is odd. It sounds like there is no conversion to a string prior to displaying it with Display Text or something. Hopefully someone from GS can shed some light on this.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,597
    Hi immor7al: think I know your problem: you can't concatanate boolean with integer; in other words, you can have any equation with these together. This is because a boolean is just two states, true or false (you can make this 0 or 1 if you want, but that is still not usesful when it comes to equations). Integers, being numbers, can be any number.

    Hope I've understood correctly and this helps.


    ""You are in a maze of twisty passages, all alike." - Zork        temp domain

Sign In or Register to comment.