Array problem. -
[RO]Five - 14.02.2014
Error: must be assigned to an array
Код:
new Curse[][][] =
{
{"Haine", "LS, Fallen Dep", "LS, BOBO", float:-576.3902, float:-497.2471, float:25.1482, float:815.9083, float:-1741.9529, float:13.0871, 10000},
{"Blugi", "LS, Fallen Dep", "LS, Victim", float:-576.3902, float:-497.2471, float:25.1482, float:455.3918, float:-1502.1124, float:30.5764, 15000},
{"Pantofi", "LS, Fallen Dep", "LS, Binco", float:-576.3902, float:-497.2471, float:25.1482, float:455.3918, float:-1502.1124, float:30.5764, 14000},
{"Adidasi", "LS, Fallen Dep", "LS, Pig Pen", float:-576.3902, float:-497.2471, float:25.1482, float:2422.2314, float:-1228.7395, float:24.5227, 8000},
{"Tricouri", "LS, Fallen Dep", "LS, Mall", float:-576.3902, float:-497.2471, float:25.1482, float:2422.2314, float:-1228.7395, float:24.5227, 16000},
{"Porti", "LS, Fallen Dep", "LS, Stadion", float:-576.3902, float:-497.2471, float:25.1482, float:2422.2314, float:-1228.7395, float:24.5227, 17500},
{"Geci", "LS, Docuri", "LS, BOBO", float:2759.9453, float:-2365.6296, float:13.2578, float:815.9083, float:-1741.9529, float:13.0871, 9000},
{"Sandale", "LS, Docuri", "LS, Victim", float:2759.9453, float:-2365.6296, float:13.2578, float:455.3918, float:-1502.1124, float:30.5764, 14000},
{"Tenisi", "LS, Docuri", "LS, Binco", float:2759.9453, float:-2365.6296, float:13.2578, float:455.3918, float:-1502.1124, float:30.5764, 13000},
{"Haine", "LS, Docuri", "LS, Pig Pen", float:2759.9453, float:-2365.6296, float:13.2578, float:2422.2314, float:-1228.7395, float:24.5227, 10000},
{"Bijuterii", "LS, Docuri", "LS, Mall", float:2759.9453, float:-2365.6296, float:13.2578, float:2422.2314, float:-1228.7395, float:24.5227, 14000},
{"Mingi", "LS, Docuri", "LS, Stadion", float:2759.9453, float:-2365.6296, float:13.2578, float:2422.2314, float:-1228.7395, float:24.5227, 12500}
};
Код:
MisiuneInfo[playerid][mLoadp_x] = Curse[idt][3]; // Error
MisiuneInfo[playerid][mLoadp_y] = Curse[idt][4]; // Error
MisiuneInfo[playerid][mLoadp_z] = Curse[idt][5]; // Error
MisiuneInfo[playerid][mUnLoadp_x] = Curse[idt][6]; // Error
MisiuneInfo[playerid][mUnLoadp_y] = Curse[idt][7]; // Error
MisiuneInfo[playerid][mUnLoadp_z] = Curse[idt][8]; // Error
strcpy(MisiuneInfo[playerid][mMarfa], Curse[idt][0], 40);
strcpy(MisiuneInfo[playerid][mLoadp], Curse[idt][1], 40);
strcpy(MisiuneInfo[playerid][mUnloadp], Curse[idt][2], 40);
Re: Array problem. -
ACI - 14.02.2014
String literals or arrays must be assigned to an array. This error message may also indicate a missing index (or indices) at the array on the right side of the "=" sign.
Re: Array problem. -
[RO]Five - 14.02.2014
Curse[idt][3],Curse[idt][4],Curse[idt][5],Curse[idt][6],Curse[idt][7],Curse[idt][8] is float.
What index missing? I'm beginner..
?
Re: Array problem. -
Konstantinos - 14.02.2014
pawn Код:
enum Curse_Enum
{
idx0[40],
idx1[40],
idx2[40],
Float: idx3,
Float: idx4,
Float: idx5,
Float: idx6,
Float: idx7,
Float: idx8,
idx9
};
new Curse[][Curse_Enum] =
{
{"Haine", "LS, Fallen Dep", "LS, BOBO", -576.3902, -497.2471, 25.1482, 815.9083, -1741.9529, 13.0871, 10000},
{"Blugi", "LS, Fallen Dep", "LS, Victim", -576.3902, -497.2471, 25.1482, 455.3918, -1502.1124, 30.5764, 15000},
{"Pantofi", "LS, Fallen Dep", "LS, Binco", -576.3902, -497.2471, 25.1482, 455.3918, -1502.1124, 30.5764, 14000},
{"Adidasi", "LS, Fallen Dep", "LS, Pig Pen", -576.3902, -497.2471, 25.1482, 2422.2314, -1228.7395, 24.5227, 8000},
{"Tricouri", "LS, Fallen Dep", "LS, Mall", -576.3902, -497.2471, 25.1482, 2422.2314, -1228.7395, 24.5227, 16000},
{"Porti", "LS, Fallen Dep", "LS, Stadion", -576.3902, -497.2471, 25.1482, 2422.2314, -1228.7395, 24.5227, 17500},
{"Geci", "LS, Docuri", "LS, BOBO", 2759.9453, -2365.6296, 13.2578, 815.9083, -1741.9529, 13.0871, 9000},
{"Sandale", "LS, Docuri", "LS, Victim", 2759.9453, -2365.6296, 13.2578, 455.3918, -1502.1124, 30.5764, 14000},
{"Tenisi", "LS, Docuri", "LS, Binco", 2759.9453, -2365.6296, 13.2578, 455.3918, -1502.1124, 30.5764, 13000},
{"Haine", "LS, Docuri", "LS, Pig Pen", 2759.9453, -2365.6296, 13.2578, 2422.2314, -1228.7395, 24.5227, 10000},
{"Bijuterii", "LS, Docuri", "LS, Mall", 2759.9453, -2365.6296, 13.2578, 2422.2314, -1228.7395, 24.5227, 14000},
{"Mingi", "LS, Docuri", "LS, Stadion", 2759.9453, -2365.6296, 13.2578, 2422.2314, -1228.7395, 24.5227, 12500}
};
pawn Код:
MisiuneInfo[playerid][mLoadp_x] = Curse[idt][idx3];
MisiuneInfo[playerid][mLoadp_y] = Curse[idt][idx4];
MisiuneInfo[playerid][mLoadp_z] = Curse[idt][idx5];
MisiuneInfo[playerid][mUnLoadp_x] = Curse[idt][idx6];
MisiuneInfo[playerid][mUnLoadp_y] = Curse[idt][idx7];
MisiuneInfo[playerid][mUnLoadp_z] = Curse[idt][idx8];
strcpy(MisiuneInfo[playerid][mMarfa], Curse[idt][idx0], 40);
strcpy(MisiuneInfo[playerid][mLoadp], Curse[idt][idx1], 40);
strcpy(MisiuneInfo[playerid][mUnloadp], Curse[idt][idx2], 40);
Re: Array problem. -
[RO]Five - 14.02.2014
Solved!
Thx.. +rep