Help needed please!
#1

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?
Reply
#2

Obvious mistake at this line:

PlayerInfo[PlayerFile][Job]
Reply
#3

What is the mistake? Im sorry, im just under standing the dini and dcmd stuff...
Reply
#4

NVM! I DID IT ALL BY MYSELF!!!
Reply
#5

-delete-
Reply
#6

actualy i had to make it PlayerInfo[playerid][Job] = 1;
Reply
#7

Yes, that was a pretty dumb mistake, next time please just use your brain for few minutes, before posting.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)