[SOLVED]array? :/
#1

Hello.
I'm using dudb system by DracoBlue,
again ,trying to make teams...
And the problem.
Firstly, i'm using this code :
pawn Код:
enum pInfo {
money,
pTeam,
pLead,
jailed
}
new gPlayerData[MAX_PLAYERS][pInfo];
then, i'm trying to define the pTeam :
pawn Код:
gPlayerData[playerid][pTeam] = dUser("PlayerName(playerid)").("pTeam");
But..
error 006: must be assigned to an array
How to make this shit working? :/
Thanks for help
Reply
#2

Guys, I know that you can do it
Reply
#3

add a "," behind jailed
Reply
#4

That is not the solution, that will lead to more errors.
I could help if it was dini, i can advise to search for dudb tutorials by DracoBlue.
Reply
#5

define pTeam like that: pTeam[256];
Reply
#6

Why this OmeRinG? It may be fix the error but it is not what he want! He want use dUserInt i think
Reply
#7

nubotron, "must be assigned to an array" means it must be assigned to an array type variable (new cmd[256];, for example), meaning it has more than one cell.....
and where he defined pTeam he made it as a normal integer variable so it gave him an error cause he tried to assign a string to it....
so my fix should fix the error..
Reply
#8

Logic... his pTeam is probably a integer where it is his team id, not a string where it is..what, team name?

When helping people you have to think what they want to do.. That is like if he have error "undefined symbol LOL", you will say him "#define LOL" ?
Reply
#9

Код:
gPlayerData[playerid][pTeam] = dUser("PlayerName(playerid)").("pTeam");
should be
Код:
gPlayerData[playerid][pTeam] = dUserINT(PlayerName(playerid)).("pTeam");
I think, never used DUDB tough..
Reply
#10

omg, thanks people.
I used this :
pawn Код:
gPlayerData[playerid][pTeam] = dUserINT(PlayerName(playerid)).("pTeam");
and it works
really thanks for your support.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)