[SOLVED]array? :/ - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]array? :/ (
/showthread.php?tid=72287)
[SOLVED]array? :/ -
kLx - 07.04.2009
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
Re: array? :/ -
kLx - 07.04.2009
Guys, I know that you can do it
Re: array? :/ -
FUNExtreme - 07.04.2009
add a "," behind jailed
Re: array? :/ -
Rks25 - 07.04.2009
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.
Re: array? :/ -
OmeRinG - 07.04.2009
define pTeam like that: pTeam[256];
Re: array? :/ -
Nubotron - 07.04.2009
Why this OmeRinG? It may be fix the error but it is not what he want! He want use dUserInt i think
Re: array? :/ -
OmeRinG - 07.04.2009
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..
Re: array? :/ -
Nubotron - 07.04.2009
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" ?
Re: array? :/ -
13th - 07.04.2009
Код:
gPlayerData[playerid][pTeam] = dUser("PlayerName(playerid)").("pTeam");
should be
Код:
gPlayerData[playerid][pTeam] = dUserINT(PlayerName(playerid)).("pTeam");
I think, never used DUDB tough..
Re: array? :/ -
kLx - 08.04.2009
omg, thanks people.
I used this :
pawn Код:
gPlayerData[playerid][pTeam] = dUserINT(PlayerName(playerid)).("pTeam");
and it works

really thanks for your support.