Hello, I am trying to create a piece of code using a plugin which will return 0;
I started by creating my struct player_data, which contain state my_state, intended to be set and red as ssd->state.my_state (1st code box)
I set my_state using an atcommand and it seems to set ok. But when I'm trying to bring it up in the following code (2nd code box), ssd->state.my_state is returning 0 even though I am sure it is really set to 1 after using my atcommand.
Hello, I am trying to create a piece of code using a plugin which will return 0;
I started by creating my struct player_data, which contain state my_state, intended to be set and red as ssd->state.my_state (1st code box)
I set my_state using an atcommand and it seems to set ok. But when I'm trying to bring it up in the following code (2nd code box), ssd->state.my_state is returning 0 even though I am sure it is really set to 1 after using my atcommand.
Looking for help thank you.
struct player_data { struct { unsigned short my_state : 1; } state; }
Share this post
Link to post
Share on other sites