Help for a little job!
#1

Hi there. I have a little problem. I`m trying to make a little job for a RP server, and it gives me this error : error 033: array must be indexed

Код:
dcmd_goduty(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 3, 2371.9854, 2759.2981, 10.8203) == 1)
	{
	  new file[128], pname[MAX_PLAYER_NAME], job[256];
	  job = dini_Get(file, "job");
		GetPlayerName(playerid, pname, sizeof(pname));
		if(GetPlayerState(playerid) == 1 && job == 1)
		{
		  SendClientMessage(playerid, COLOR_GOLD, "Now go and get a garbage truck and do your job!");
  	}
  	else SendClientMessage(playerid, COLOR_GOLD, "You must be on foot! Get out of the vehicle.");
  	return 1;
	}
	else SendClientMessage(playerid, COLOR_GOLD, "You don`t have that job or you are not at the duty position!");
	return 1;
}
dcmd_takejob(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 3, 2371.9854, 2759.2981, 10.8203) == 1)
	{
	  new file[128], pname[MAX_PLAYER_NAME];
		GetPlayerName(playerid, pname, sizeof(pname));
		format(file, sizeof(file), "\\Users\\%s.ini", pname);
		dini_IntSet(file, "job", 1);
		SendClientMessage(playerid, COLOR_GOLD, "Congratulations with your new job!");
	}
	return 1;
}
Reply


Messages In This Thread
Help for a little job! - by sobolanux - 12.04.2010, 21:58
Re: Help for a little job! - by M4S7ERMIND - 12.04.2010, 22:08
Re: Help for a little job! - by sobolanux - 12.04.2010, 22:19

Forum Jump:


Users browsing this thread: 1 Guest(s)