rBits: error 001: unexpected token
#1

Код:
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>
Reply
#2

I can't understand what you're trying to do..
Reply
#3

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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)