PDA

View Full Version : rBits: error 001: unexpected token


venomlivno8
30/06/2018, 11:06 PM
player/data.pwn(12) : warning 213: tag mismatch

Error line:
rBit1_Set(Session[i], playerid, 0);

Whole function:

forward ReloadSession(playerid);
public ReloadSession(playerid) {
for(new i = 0; i < sizeof(Session); i++) {
rBit1_Set(Session[i], playerid, 0);
}
return 1;
}

Session declaration and the enum

enum E_SESSION_DATA {
sSpawned,
sLoggedIn
};

new
rBit1: Session[E_SESSION_DATA]<MAX_PLAYERS>

JasonRiggs
01/07/2018, 12:19 AM
I can't understand what you're trying to do..

Akeem
01/07/2018, 01:53 AM
If i understand what your trying to do your code should be


enum E_SESSION_DATA {
sSpawned,
sLoggedIn
};

new
rBit1: Session[MAX_PLAYERS][E_SESSION_DATA]


forward ReloadSession(playerid);
public ReloadSession(playerid) {
for(new i = 0; i < MAX_PLAYERS; i++) {
rBit1_Set(Session[i][sLoggedIn], playerid, 0);
}
return 1;
}