Is that possible to use each byte as a variable in enum? (+REP)
#1

when I do the next thing it's giving me errors, there is any possible way to do something similar?

PHP код:
enum info
{
    
slot[35]
}
new 
playerinfo[MAX_PLAYERS][info];
public 
OnPlayerConnect(playerid)
{
    
playerinfo[playerid][slot[0]] = 12;
    
playerinfo[playerid][slot[1]] = 69;

well I can make "slot1, slot2, slot3" but that sucks and I won't be able to do the next thing:
PHP код:
for(new i35i++)
{
    
playerinfo[playerid][slot[i]] = 17;

Reply
#2

Код HTML:
for(new i; i < 35; i++) 
{ 
    playerinfo[playerid][slot][i] = 17; 
}  
Reply
#3

Quote:
Originally Posted by Injury
Посмотреть сообщение
Код HTML:
for(new i; i < 35; i++) 
{ 
    playerinfo[playerid][slot][i] = 17; 
}  
you earned it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)