02.07.2012, 09:33
hello,
I made a release system so normal players can release players from police prison.
but I get these errors.
Can someone help?
I made a release system so normal players can release players from police prison.
but I get these errors.
Can someone help?
pawn Код:
case 5000:
{
switch(listitem)
{
case 0:
{
GivePlayerMoney(playerid, -Player[playerid][Wantedlvl]*5000);
SetPlayerWantedLevel(playerid, 0);
}
case 1:
{
ShowPlayerDialog(playerid, 5001, DIALOG_STYLE_INPUT, "Police Department Jail", "Enter the name of the player you wanna release", "Enter", "Quit");
}
}
}
case 5001:
{
new string[128];
if(strlen(inputtext) >= 1)
{
if(Player[inputtext][PrisonID] == 2)
{
Player[playerid][Money] -= Player[inputtext][PrisonDuration]*400;
Player[inputtext][PrisonID] = 0;
Player[inputtext][PrisonDuration] = 0;
format(string, sizeof(string), "You have been released from prison by %s", GetName(playerid));
SCM(inputtext, GREEN, string);
}
}
else
{
SCM(playerid, RED, "Incorrect name!");
}
}
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInCheckpoint(playerid) == ReleaseCP)
{
ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_LIST, "Police Department Jail", "Lose Wanteds ($5000 a level)\nRelease a suspect ($400 a second)", "Select", "Quit");
}
return 1;
}
pawn Код:
C:\Users\Stefan Dorst\Desktop\LSRES\gamemodes\LSRES.pwn(2131) : error 033: array must be indexed (variable "inputtext")
C:\Users\Stefan Dorst\Desktop\LSRES\gamemodes\LSRES.pwn(2133) : error 033: array must be indexed (variable "inputtext")
C:\Users\Stefan Dorst\Desktop\LSRES\gamemodes\LSRES.pwn(2134) : error 033: array must be indexed (variable "inputtext")
C:\Users\Stefan Dorst\Desktop\LSRES\gamemodes\LSRES.pwn(2135) : error 033: array must be indexed (variable "inputtext")
C:\Users\Stefan Dorst\Desktop\LSRES\gamemodes\LSRES.pwn(2137) : error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.