25.10.2009, 05:55
dcmd_join(playerid, params[])
{
new pName[24], PlayerFile[50], pJob[50];
GetPlayerName(playerid, pName, sizeof(pName));
format(PlayerFile, sizeof(PlayerFile), "/users/%s.ini", pName);
if(!dini_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You aren't registered! Use /register to create an account.");
if(dini_Exists(PlayerFile))
{
pJob[24] = dini_Int(PlayerFile, "Job");
if(PlayerInfo[playerid][Job] == 0)
{
if(IsPlayerInRangeOfPoint(playerid,1,2557.1714,206 4.3223,11.0995))
{
PlayerInfo[PlayerFile][Job] = 1
SendClientMessage(playerid, COLOR_WHITE, "You are now a gun dealer.");
dini_IntSet(PlayerFile, "Job", 1);
}
else
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not within the job pickup!");
}
}
else
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You already have a job!");
}
}
#pragma unused params
return 1;
}
error:
C:\Users\Administrator\Desktop\Pawno 0.3\filterscripts\TAdmin.pwn(892) : error 033: array must be indexed (variable "PlayerFile")
What do i need to do to fix this?
{
new pName[24], PlayerFile[50], pJob[50];
GetPlayerName(playerid, pName, sizeof(pName));
format(PlayerFile, sizeof(PlayerFile), "/users/%s.ini", pName);
if(!dini_Exists(PlayerFile)) return SendClientMessage(playerid, COLOR_BRIGHTRED, "You aren't registered! Use /register to create an account.");
if(dini_Exists(PlayerFile))
{
pJob[24] = dini_Int(PlayerFile, "Job");
if(PlayerInfo[playerid][Job] == 0)
{
if(IsPlayerInRangeOfPoint(playerid,1,2557.1714,206 4.3223,11.0995))
{
PlayerInfo[PlayerFile][Job] = 1
SendClientMessage(playerid, COLOR_WHITE, "You are now a gun dealer.");
dini_IntSet(PlayerFile, "Job", 1);
}
else
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You are not within the job pickup!");
}
}
else
{
SendClientMessage(playerid, COLOR_BRIGHTRED, "You already have a job!");
}
}
#pragma unused params
return 1;
}
error:
C:\Users\Administrator\Desktop\Pawno 0.3\filterscripts\TAdmin.pwn(892) : error 033: array must be indexed (variable "PlayerFile")
What do i need to do to fix this?