PDA

View Full Version : Looking for plugin with function


IndependentGaming
16/02/2018, 12:01 PM
Hello, I just grabbed something form another gm but this function "szMiscArray"
What plugin does belong to this and how to define this ?

PepsiCola23
16/02/2018, 12:05 PM
lines + errors?

IndependentGaming
16/02/2018, 12:08 PM
lines + errors?


./includes/functions.pwn(11003) : error 017: undefined symbol "szMiscArray"
./includes/functions.pwn(11003) : warning 215: expression has no effect
./includes/functions.pwn(11003) : error 001: expected token: ";", but found "]"
./includes/functions.pwn(11003) : error 029: invalid expression, assumed zero
./includes/functions.pwn(11003) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.







ShowDocPrisonControls(playerid, icontrolid)
{
szMiscArray[0] = 0;

switch(icontrolid)
{
case 0:
{
// main dialog
format(szMiscArray, sizeof(szMiscArray), "Cell-block A\nIsolation Cells\nArea Doors\nLockdown\nIntercom");
ShowPlayerDialog(playerid, DIALOG_DOC_CP, DIALOG_STYLE_LIST, "Doc Control Pannel", szMiscArray, "Select", "Cancel");
}
case 1:
{
// sub-dialog
format(szMiscArray, sizeof(szMiscArray), "Floor 1\nFloor 2\nAll Floor 1\nAll Floor 2");
ShowPlayerDialog(playerid, DIALOG_DOC_CP_SUB, DIALOG_STYLE_LIST, "Doc Control Pannel", szMiscArray, "Select", "Back");
}
case 2:
{
// floor 1
format(szMiscArray, sizeof(szMiscArray), "Cell 1 (%s)\n\
Cell 2 (%s)\n\
Cell 3 (%s)\n\
Cell 4 (%s)\n\
Cell 5 (%s)\n\
Cell 6 (%s)\n\
Cell 7 (%s)\n\
Cell 8 (%s)\n\
Cell 9 (%s)\n\
Cell 10 (%s)\n\
Cell 11 (%s)\n\
Cell 12 (%s)\n\
Cell 13 (%s)\n\
Cell 14 (%s)\n\
Cell 15 (%s)\n\
Cell 16 (%s)",
((bDocCellOpen[0] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[1] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[2] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[3] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[4] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[5] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[6] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[7] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[8] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[9] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[10] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[11] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[12] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[13] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[14] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[15] == false) ? ("{FF0000}Closed"):("{00FF00}Open"))
);
ShowPlayerDialog(playerid, DIALOG_DOC_CP_C1F1, DIALOG_STYLE_LIST, "Doc Control Pannel", szMiscArray, "Select", "Back");
}
case 3:
{
// floor 2
format(szMiscArray, sizeof(szMiscArray), "Cell 1 (%s)\n\
Cell 2 (%s)\n\
Cell 3 (%s)\n\
Cell 4 (%s)\n\
Cell 5 (%s)\n\
Cell 6 (%s)\n\
Cell 7 (%s)\n\
Cell 8 (%s)\n\
Cell 9 (%s)\n\
Cell 10 (%s)\n\
Cell 11 (%s)\n\
Cell 12 (%s)\n\
Cell 13 (%s)\n\
Cell 14 (%s)\n\
Cell 15 (%s)",
((bDocCellOpen[16] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[17] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[18] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[19] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[20] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[21] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[22] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[23] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[24] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[25] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[26] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[27] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[28] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[29] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocCellOpen[30] == false) ? ("{FF0000}Closed"):("{00FF00}Open"))
);
ShowPlayerDialog(playerid, DIALOG_DOC_CP_C1F2, DIALOG_STYLE_LIST, "Doc Control Pannel", szMiscArray, "Select", "Back");
}
case 4:
{
// area controls
format(szMiscArray, sizeof(szMiscArray), "Cell-block 1(%s)\n\
Cell-block 2 (%s)\n\
Showers (%s)\n\
Cafe 1 (%s)\n\
Cafe 2 (%s)\n\
Laundry Room (%s)\n\
Isolation Block (%s)\n\
Control Room (%s)\n\
Processing 1 (%s)\n\
Processing 2 (%s)\n\
Processing 3 (%s)\n\
Classroom (%s)\n\
Janitor's Closet (%s)\n\
Medical Ward (%s)\n\
Hallway(%s)\n\
Lobby 1 (%s)\n\
Lobby 2 (%s)\n\
Visitation (%s)",
((bDocAreaOpen[0] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[1] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[2] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[3] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[4] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[5] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[6] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[7] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[8] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[9] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[10] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[11] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[12] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[13] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[14] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[15] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[16] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[17] == false) ? ("{FF0000}Closed"):("{00FF00}Open")),
((bDocAreaOpen[18] == false) ? ("{FF0000}Closed"):("{00FF00}Open"))
);
ShowPlayerDialog(playerid, DIALOG_DOC_CP_AREA, DIALOG_STYLE_LIST, "Doc Control Pannel", szMiscArray, "Select", "Back");
}
}
return 1;
}

DocLockdown(playerid)
{
new szWarning[128];

if(bDocLockdown == false)
{

bDocLockdown = true;
for(new i = 0; i < 31; i++)
{
OpenDocCells(i, 0);
}
for(new i = 0; i < 19; i++)
{
OpenDocAreaDoors(i, 0);
}
format( szWarning, sizeof(szWarning), "ALERT: The DeMorgan Correctional Facility is now on lockdown for an emergency (( %s ))", GetPlayerNameEx(playerid));
SendGroupMessage(1, COLOR_RED, szWarning);

//format(szMiscArray, sizeof szMiscArray, "%s has set the DeMorgan Correctional Facilty on lockdown.", GetPlayerNameEx(playerid));
//GroupLog(PlayerInfo[playerid][pMember], szMiscArray);
}
else
{
bDocLockdown = false;
format( szWarning, sizeof(szWarning), "ALERT: The DeMorgan Correctional Facility is no longer on lockdown (( %s ))", GetPlayerNameEx(playerid));
SendGroupMessage(1, COLOR_YELLOW, szWarning);

//format(szMiscArray, sizeof szMiscArray, "%s has removed the DeMorgan Correctional Facilty from lockdown.", GetPlayerNameEx(playerid));
//GroupLog(PlayerInfo[playerid][pMember], szMiscArray);
}
}

I tried to change it to string but it didn't work then the dialog doesn't show ingame

Mugala
16/02/2018, 12:16 PM
add that variable at the top of the code.
new szMiscArray[MAX_PLAYERS];

IndependentGaming
16/02/2018, 12:20 PM
add that variable at the top of the code.
new szMiscArray[MAX_PLAYERS];

Just that line on the top ?

PepsiCola23
16/02/2018, 12:21 PM
what`s the line 11003?

IndependentGaming
16/02/2018, 12:22 PM
what`s the line 11003?

line 11003 is szMiscArray[0] = 0;

PepsiCola23
16/02/2018, 12:23 PM
did you add the line mugala said?

Mugala
16/02/2018, 12:30 PM
Just that line on the top ?

no, at the top of the whole script.

IndependentGaming
16/02/2018, 12:33 PM
add that variable at the top of the code.
new szMiscArray[MAX_PLAYERS];

Thanks for the help mate, I fixed the problem.

Mugala
16/02/2018, 12:38 PM
this must be a mapping problem or caused by typing wrong coordinates, so we can't help u on it, you have to figure out the problem by yourself and fix it.

PepsiCola23
16/02/2018, 12:41 PM
this must be a mapping problem or caused by typing wrong coordinates, so we can't help u on it, you have to figure out the problem by yourself and fix it.


guess you replied to the wrong topic mate

Mugala
16/02/2018, 01:43 PM
guess you replied to the wrong topic mate
nah, he have a mapping problem now.