07.09.2015, 22:09
I can't understand why it is giving me errors
Ignore everything NOT related to Admins stuff
I am not quite sure, but I am trying to save my admins, so I created a stock
Errors:
On this line:
Please help,
Ignore everything NOT related to Admins stuff
PHP код:
public OnPlayerConnect(playerid)
{
// Map ICONS
SetPlayerMapIcon(playerid, 12, 1365.3500,-1279.0601,13.5469, 6, 0, MAPICON_LOCAL); // Ammu - LS
SetPlayerMapIcon(playerid, 11, 2386.7107,1043.2142,10.8203, 42, 0, MAPICON_LOCAL); // Transfender - LV
SetPlayerMapIcon(playerid, 13, 2156.5127,943.2316,10.8203, 6, 0, MAPICON_LOCAL); // Ammu - LV
SetPlayerMapIcon(playerid, 10, 2114.8137,921.0313,10.8203, 51, 0, MAPICON_LOCAL); // Gas station - Com a lot
SetPlayerMapIcon(playerid, 14, 2023.2521,1007.5231,10.8203, 43, 0, MAPICON_LOCAL); // 4D Casino
SetPlayerMapIcon(playerid, 15, 2193.5527,1677.0909,12.3672, 44, 0, MAPICON_LOCAL); // Caligula's Casino
SetPlayerMapIcon(playerid, 9, 1970.1549,2161.5730,11.0703, 63, 0, MAPICON_LOCAL); // Pay n Spray LV
SetPlayerMapIcon(playerid, 16, 2191.9939,1991.2040,12.0938, 38, 0, MAPICON_LOCAL); // 24/7 The strip
new string[350], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof string, "%s is connected to the server.", pName);
SendClientMessageToAll(COLOR_GREY, string);
new pData[120];
mutedtime[playerid] = 0;
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(pData, sizeof pData, "/Accounts/%s.txt", pName);
if(dini_Exists(pData))
new Administrators[120];
format(Administrators, sizeof Administrators, "/Administrators/%s.txt", pName);
if(dini_Exists(Administrators))
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Enter your password", "Login", "Cancel");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", "Fill in a password to register", "Register", "Cancel");
}
return 1;
}
PHP код:
stock Admins(playerid, adminlevel[])
{
new Administrators[120];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(Administrators, sizeof Administrators, "/Administrators/%s.txt", pName);
dini_Create(Administrators);
dini_Set(Administrators, "AdminLevel", adminlevel);
return 1;
}
Quote:
error 003: declaration of a local variable must appear in a compound block error 017: undefined symbol "Administrators" warning 215: expression has no effect error 001: expected token: ";", but found "]" fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
PHP код:
new Administrators[120];