01.06.2011, 14:14
Hello guys.
Today I was trying to improve a system (its more like changing it).But I have the following errors set:
Lines:
I know the errors are because of the brackets after the tmp (tmp[256]),but I don't know what to do in order to fix it.
Please help guys
Today I was trying to improve a system (its more like changing it).But I have the following errors set:
pawn Код:
(95) : error 033: array must be indexed (variable "tmp")
(96) : error 033: array must be indexed (variable "tmp")
(97) : error 033: array must be indexed (variable "tmp")
(98) : error 033: array must be indexed (variable "tmp")
(99) : error 033: array must be indexed (variable "tmp")
(100) : error 033: array must be indexed (variable "tmp")
(101) : error 033: array must be indexed (variable "tmp")
(101) : warning 213: tag mismatch
(102) : error 033: array must be indexed (variable "tmp")
(104) : error 033: array must be indexed (variable "tmp")
(106) : error 029: invalid expression, assumed zero
(106) : error 033: array must be indexed (variable "tmp")
(106) : error 029: invalid expression, assumed zero
(106) : fatal error 107: too many error messages on one line
pawn Код:
if(strcmp(cmd, "/createlocation", true)==0 || strcmp(cmd, "/createloc", true)==0) //example: /createloc 2
{
new str[128],tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_USAGE,"USAGE: /createlocation [Location ID]");
new Float:X,Float:Y,Float:Z,Float:A,Interior;
new pName[MAX_PLAYER_NAME];
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
Interior = GetPlayerInterior(playerid);
GetPlayerName(playerid, pName, sizeof(pName));
LocInfo[tmp][LocX] = X; // Float
LocInfo[tmp][LocY] = Y; // Float
LocInfo[tmp][LocZ] = Z; // Float
LocInfo[tmp][LocA] = A; // Float
LocInfo[tmp][LocInterior] = Interior;
LocInfo[tmp][LocCreator] = pName;
LocInfo[tmp][AvailableTeleport] = 1; // Bool
format(str, 128, "You have succesfully set saved location %d to the following settings:",LocInfo[tmp][LocNumber]);
SendClientMessage(playerid, COLOR_BPINK, str);
format(str, 128, "Coordinations: %.2f,%.2f,%.2f",LocInfo[tmp][LocX],LocInfo[tmp][LocY],LocInfo[tmp][LocZ]);
SendClientMessage(playerid, COLOR_BPINK, str);
format(str, 128, "Angle: %.1f",,LocInfo[tmp][LocA]);
SendClientMessage(playerid, COLOR_BPINK, str);
format(str, 128, "Interior: %d",LocInfo[tmp][LocInterior]);
SendClientMessage(playerid, COLOR_BPINK, str);
PlayerPlaySound(playerid,1138,X,Y,Z);
return 1;
}
Please help guys