#1

Error
Код:
error 033: array must be indexed (variable "freeIndex")
My code

Код:
CMD:test(playerid, params[])
{
	new name[MAX_PLAYER_NAME+1];
   	new Float:pos[3];
	GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
	GetPlayerName(playerid, name, sizeof(name));
	seed[freeIndex][seedObjectID] = CreateDynamicObject(19473, pos[0], pos[1], pos[2], 0.0, 0.0, 0.0);
	strcpy(seed[freeIndex][seedGrower], name, MAX_PLAYER_NAME+1);
	seed[freeIndex][growTimestamp] = gettime();
	seed[freeIndex][isPickable] = false;
	seed[freeIndex][informationLabel] = CreateDynamic3DTextLabel("0s", -1, pos[0], pos[1], pos[2]-0.50, 10.0);
	seed[freeIndex][updatingTimer] = SetTimerEx("updateSeedIndex", 1000, false, "i", freeIndex);
}
pls help me
Reply
#2

Show your array.
Reply
#3

Quote:

new freeIndex[MAX_PLAYERS];

this is , i think is wrong
Reply
#4

It should be in your array. freeIndex;
Reply
#5

i don't have an array, i just have new freeindex
Reply
#6

It's where you define seed. for example it should look like

Код:
enum pInfo
{
    test,
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#7

Quote:

enum ten_enum
{
seedObjectID, //
stringeedGrower[MAX_PLAYER_NAME+1], //
growTimestamp, //
bool:isPickable, // =
Text3D:informationLabel, //
updatingTimer //
}

new seed[MAX_SEEDS][ten_enum];

here
Reply
#8

Remove
Код:
new freeIndex[MAX_PLAYERS];
Add
Код:
freeIndex;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)