09.11.2013, 20:22
I've got a problem on a new function i've started to create and its returning (CHECK CODE) on compile yet i've done the same thing before on another stock.
Код:
C:\Users\Lil' J\Music\SAMP\RP\gamemodes\Scratch.pwn(2783) : error 033: array must be indexed (variable "location") C:\Users\Lil' J\Music\SAMP\RP\gamemodes\Scratch.pwn(2784) : error 033: array must be indexed (variable "reason")
pawn Код:
case DIALOG_PLAYER_911_REASON:
{
if(response)
{
if(GetPVarInt(playerid, "IsCalling911") == 1)
{
new location[100];
GetPVarString(playerid, "Calling911_Location", location, 100);
AddEmergencyCall(playerid, location, inputtext);
}
}
}
stock AddEmergencyCall(playerid, location[], reason[])
{
for(new i =0; i < MAX_EMERGENCY_CALLS; i++)
{
if(i > MAX_EMERGENCY_CALLS) return SendClientMessage(playerid, COLOR_LIGHTRED, "[Dispatch]: All our officers are currently involved in situtations, please call back later.");
if(EmergencyCallInfo[i][CallSlotUsed] == 0)
{
EmergencyCallInfo[i][CallID] = i;
format(EmergencyCallInfo[i][Caller], 50, "%s", GetRolePlayName(playerid));
format(EmergencyCallInfo[i][location], 100, "%s", cloc);
format(EmergencyCallInfo[i][reason], 100, "%s", cres);
break;
}
}
return true;
}