Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Debug messages not returning anything
Debug messages not returning anything
2003-02-12, 11:19 AM #1
Code:
if(type == 16)
    {
      if(jkgetflags(player) & 0x1) print("have saber");
      if(!jkgetflags(player) & 0x1) print("no saber");
      if(!jkgetflags(player) & 0x2) print("not swinging");
      if(jkgetflags(player) & 0x2) print("swinging");
      if(!jkgetflags(player) & 0x4) print("not magsealed");
      if(jkgetflags(player) & 0x4) print("magsealed");
    }


It is very consistant about telling me when I have or do not have a saber, but it doesn't print ANYTHING regarding 0x2 or 0x4.

I don't see how you can both have and not-have a flag at the same time.

Any h3lp would be REALLY appreciated.
2003-02-12, 11:26 AM #2
Post the whole cog, there might be an error somewhere else. Otherwise, maybe LEC was stupid and forgot that part of the debug flags [http://forums.massassi.net/html/wink.gif] Oh I wish they would release the source code...
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"
2003-02-12, 11:44 AM #3
The cog is completely error-free except for that.

This isn't dealing with any "Debug flags," I'm using JK flags and thing flags.

Source code has nothing to do with it.
2003-02-12, 12:49 PM #4
Like I told you in a PM, you need to encase your evaluation in ()'s if you're using !, like this: if(!(SomethingFlags(player) & 0x20))
-Hell Raiser
2003-02-12, 2:34 PM #5
I can't believe I missed that! If my programming teacher saw I missed that I would be dead!!! Oh well, it should hopefully work now.
Sam: "Sir we can't call it 'The Enterprise'"
Jack: "Why not!"

↑ Up to the top!