Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 13,353 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bitwise operation not working for me #207686
05/21/08 17:36
05/21/08 17:36
Joined: May 2008
Posts: 13
Greece
N
ngiannakas Offline OP
Newbie
ngiannakas  Offline OP
Newbie
N

Joined: May 2008
Posts: 13
Greece
hello all
learning to write Lite-C code, while on some panel I tried to make it visible and invisible and went to add the bitwise operation

PANEL* aPanel =
{
pos_x = 0;
pos_y = 0;
layer = 1;
bmap = first_pcx;
flags = OVERLAY | VISIBLE;
flags &= ~VISIBLE;
}

it gives me this error,

< flags^&= ~VISIBLE;>
MAIN.C 7:1 (): Flag unknown &

the last line from the panel is from the Lite-C help file explaining how to reset flag values

thanks for reading this

P.S. the & is the AND symbol on my computer, don't know why it looks like this on the forum, maybe that is also the reason it is not working but it works on other languages and I am doing bitwise operations on SecondLife with their LSL scripting language

Re: bitwise operation not working for me [Re: ngiannakas] #207703
05/21/08 18:49
05/21/08 18:49
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
you could use set(aPanel,VISIBLE);
and to make it invisble reset(aPanel,VISIBLE);

flags &= ~VISIBLE; dont work i dont know but maby the do in a func

same is like pos_x = vara; cant be done inside the panel statement


"empty"
Re: bitwise operation not working for me [Re: flits] #207706
05/21/08 19:00
05/21/08 19:00
Joined: May 2008
Posts: 13
Greece
N
ngiannakas Offline OP
Newbie
ngiannakas  Offline OP
Newbie
N

Joined: May 2008
Posts: 13
Greece
thanks that worked, made the panel keyboard command work from the main keyboard loop and it works, but it is weird, how you can flags = OVERLAY | VISIBLE; inside the panel it self, but cannot flags = flags & ~VISIBLE;

Re: bitwise operation not working for me [Re: ngiannakas] #220951
08/11/08 02:20
08/11/08 02:20
Joined: Jun 2008
Posts: 91
C
Coisox Offline
Junior Member
Coisox  Offline
Junior Member
C

Joined: Jun 2008
Posts: 91
PANEL* aPanel =
{
flags |= (OVERLAY| VISIBLE);
}

function abc()
{
aPanel.flags |= (OVERLAY| VISIBLE);
}


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1