too many errors on one line (+rep) -
ashwinsekhari - 12.06.2014
hey guys im getting these errors
Код:
C:\Users\Ashwin\Desktop\trial server\filterscripts\LuxAdmin.pwn(781) : error 003: declaration of a local variable must appear in a compound block
C:\Users\Ashwin\Desktop\trial server\filterscripts\LuxAdmin.pwn(781) : warning 217: loose indentation
C:\Users\Ashwin\Desktop\trial server\filterscripts\LuxAdmin.pwn(781) : error 017: undefined symbol "lstring"
C:\Users\Ashwin\Desktop\trial server\filterscripts\LuxAdmin.pwn(781) : warning 215: expression has no effect
C:\Users\Ashwin\Desktop\trial server\filterscripts\LuxAdmin.pwn(781) : error 001: expected token: ";", but found "]"
C:\Users\Ashwin\Desktop\trial server\filterscripts\LuxAdmin.pwn(781) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
on these lines
pawn Код:
if(!udb_Exists(PlayerName2(playerid)))
// #if USE_DIALOGS == true
new rstring[256];
format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
// #endif
return 1;
else
AW: too many errors on one line (+rep) -
BiosMarcel - 12.06.2014
what is under else?
Re: too many errors on one line (+rep) -
ashwinsekhari - 12.06.2014
k im posting full code
pawn Код:
//==============================================================================
// Register & Login
//==============================================================================
if(strlen(dini_Get("LuxAdmin/Config/aka.txt", tmp3)) == 0)
dini_Set("LuxAdmin/Config/aka.txt", tmp3, PlayerName);
else
{
if( strfind( dini_Get("LuxAdmin/Config/aka.txt", tmp3), PlayerName, true) == -1 )
{
format(string,sizeof(string),"%s,%s", dini_Get("LuxAdmin/Config/aka.txt",tmp3), PlayerName);
dini_Set("LuxAdmin/Config/aka.txt", tmp3, string);
}
}
if(!udb_Exists(PlayerName2(playerid)))
// #if USE_DIALOGS == true
new rstring[256];
format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
// #endif
return 1;
else
{
AccInfo[playerid][Registered] = 1;
format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(PlayerName));
new tmp2[256]; tmp2 = dini_Get(file,"Ip");
if( (!strcmp(tmp3,tmp2,true)) && (ServerInfo[AutoLogin] == 1))
{
LoginPlayer(playerid);
if(AccInfo[playerid][Level] > 0)
{
switch(AccInfo[playerid][Level])
{
case 1: AdmRank = "Basic Moderator";
case 2: AdmRank = "Moderator";
case 3: AdmRank = "Master Moderator";
case 4: AdmRank = "Administrator";
case 5: AdmRank = "Master Administrator";
}
if(AccInfo[playerid][Level] > 5)
{
AdmRank = "Professional Admin";
}
//==============================================================================
// VIP System
//==============================================================================
if(AccInfo[playerid][pVip] > 0)
{
switch(AccInfo[playerid][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
format(string,sizeof(string),"|- You have been Automatically Logged in | Account: %s | Level %d - %s -|", AccType, AccInfo[playerid][Level],AdmRank);
SendClientMessage(playerid,0x00C378AA,string);
}
else
{
format(string,sizeof(string),"|- You have been Automatically Logged in | Level %d - %s -|", AccInfo[playerid][Level],AdmRank);
SendClientMessage(playerid,green,string);
}
//==============================================================================
}
else
{
if(AccInfo[playerid][pVip] > 0)
{
switch(AccInfo[playerid][pVip])
{
case 1: AccType = "Silver";
case 2: AccType = "Gold";
case 3: AccType = "Premium";
}
format(string,sizeof(string),"|- You have been Automatically Logged in - Account Type: %s", AccType);
SendClientMessage(playerid,0x00C896AA,string);
}
else
{
format(string,sizeof(string),"|- You have been Automatically Logged in");
SendClientMessage(playerid,green,string);
}
}
}
else
// #if USE_DIALOGS == true
new lstring[256];
format(lstring,256,"That account '%s 'is Registered!\n\n Login to access your Account:",pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+67,DIALOG_STYLE_INPUT,"Login Account",lstring,"Login","Quit");
// #endif
return 1;
}
return 1;
AW: too many errors on one line (+rep) -
BiosMarcel - 12.06.2014
i think the loose indentitation Errors are caused by missing brackets
Re: too many errors on one line (+rep) -
ashwinsekhari - 12.06.2014
actually im editing code for lux admin so that regiter and login dialogs are shown when player is connected
so just a try btw what i need to do
and leave loose idnentaions wb errors
Re: too many errors on one line (+rep) -
ashwinsekhari - 12.06.2014
done i added those brackets and it fixed btw here is you +rep
AW: too many errors on one line (+rep) -
BiosMarcel - 12.06.2014
no prob thanks for the rep
Re: too many errors on one line (+rep) -
Amrev - 12.06.2014
Код:
if(!udb_Exists(PlayerName2(playerid)))
{
// #if USE_DIALOGS == true
new rstring[256];
format(rstring,256,"Welcome to the '%s'\n\nAccount '%s' is not registred!\n\nEnter the password to Register your Account:",GetServerHostName(),pName(playerid));
ShowPlayerDialog(playerid,DIALOGID+66,DIALOG_STYLE_INPUT,"Register Account",rstring,"Register","Quit");
// #endif
return 1;
}