26 Errors what the....
#6

Quote:
Originally Posted by PinkFloydLover
Посмотреть сообщение
You must have an opening bracket for every closing bracket, for example

pawn Код:
if(SomeFunction() == 1)
{//opening bracket
    //do something here
}//closing bracket
Full code

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new file[100],Name[MAX_PLAYER_NAME]; GetPlayerName(playerid,Name,MAX_PLAYER_NAME);
	format(file,sizeof(file),PlayerFile,Name);
	if(dialogid == 9696) //Choosing
	{
	if(!response)
	{
	if(!fexist(file))
	{
	ShowPlayerDialog(playerid,135,DIALOG_STYLE_PASSWORD,"Registration","Please Type A Chosen Password Below To Register","Register","Cancel");
	}
	else if(fexist(file))
	{
	SendClientMessage(playerid,COLOR_RED,"You Are Already Registered");
	ShowPlayerDialog(playerid,9696,DIALOG_STYLE_MSGBOX,"Login & Register Dialog,"Welcome To The Server","Login","Register");
	}
	}
	if(response)
	{
	if(fexist(file))
	{
	ShowPlayerDialog(playerid,246,DIALOG_STYLE_PASSWORD,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	else if(!fexist(file))
	{
    SendClientMessage(playerid,COLOR_RED,"You Need To Register In Order To Login");
	ShowPlayerDialog(playerid,9696,DIALOG_STYLE_MSGBOX,"Login & Register Dialog,"Welcome To The Server","Login","Register");
	}
	}
	}
	if(dialogid == 135) //Registration
	{
	if(!response)
	{
	SendClientMessage(playerid,COLOR_RED,"You Have To Register In Order To Play!");
	ShowPlayerDialog(playerid,135,DIALOG_STYLE_INPUT,"Registration","Please Type A Chosen Password Below To Register","Register","Cancel");
	}
	if(response)
	{
	new Float:Health,Float:Armour; GetPlayerHealth(playerid,Health); GetPlayerArmour(playerid,Armour);
	dini_Create(file);
	new pName[24]; GetPlayerName(playerid,pName,24); new IP[16]; GetPlayerIp(playerid,IP,16);
	dini_Set(file, "Name", pName);
	dini_Set(file, "Ip Adress", IP);
	dini_IntSet(file, "Password", udb_hash(inputtext));
	dini_IntSet(file, "Money",0);
	dini_IntSet(file, "Score",0);
	dini_IntSet(file, "Kills",0);
	dini_IntSet(file, "Deaths",0);
	dini_IntSet(file,"Skin",GetPlayerSkin(playerid));
	dini_IntSet(file,"Wanted Level",GetPlayerWantedLevel(playerid));
	dini_IntSet(file,"Interior",GetPlayerInterior(playerid));
	dini_IntSet(file,"Virtual World",GetPlayerVirtualWorld(playerid));
	dini_IntSet(file,"Drunk Level",GetPlayerDrunkLevel(playerid));
	dini_IntSet(file,"Fighting Style",GetPlayerFightingStyle(playerid));
	dini_IntSet(file,"Team",GetPlayerTeam(playerid));
	GetPlayerWeaponData(playerid,0,pInfo[playerid][Wep1],pInfo[playerid][Ammo1]);
	GetPlayerWeaponData(playerid,1,pInfo[playerid][Wep2],pInfo[playerid][Ammo2]);
	GetPlayerWeaponData(playerid,2,pInfo[playerid][Wep3],pInfo[playerid][Ammo3]);
	GetPlayerWeaponData(playerid,3,pInfo[playerid][Wep4],pInfo[playerid][Ammo4]);
	GetPlayerWeaponData(playerid,4,pInfo[playerid][Wep5],pInfo[playerid][Ammo5]);
	GetPlayerWeaponData(playerid,5,pInfo[playerid][Wep6],pInfo[playerid][Ammo6]);
	GetPlayerWeaponData(playerid,6,pInfo[playerid][Wep7],pInfo[playerid][Ammo7]);
	GetPlayerWeaponData(playerid,7,pInfo[playerid][Wep8],pInfo[playerid][Ammo8]);
	dini_IntSet(file,"Weapon 1",pInfo[playerid][Wep1]);
	dini_IntSet(file,"Ammo 1",pInfo[playerid][Ammo1]);
	dini_IntSet(file,"Weapon 2",pInfo[playerid][Wep2]);
	dini_IntSet(file,"Ammo 2",pInfo[playerid][Ammo2]);
	dini_IntSet(file,"Weapon 3",pInfo[playerid][Wep3]);
	dini_IntSet(file,"Ammo 3",pInfo[playerid][Ammo3]);
	dini_IntSet(file,"Weapon 4",pInfo[playerid][Wep4]);
	dini_IntSet(file,"Ammo 4",pInfo[playerid][Ammo4]);
	dini_IntSet(file,"Weapon 5",pInfo[playerid][Wep5]);
	dini_IntSet(file,"Ammo 5",pInfo[playerid][Ammo5]);
	dini_IntSet(file,"Weapon 6",pInfo[playerid][Wep6]);
	dini_IntSet(file,"Ammo 6",pInfo[playerid][Ammo6]);
	dini_IntSet(file,"Weapon 7",pInfo[playerid][Wep7]);
	dini_IntSet(file,"Ammo 7",pInfo[playerid][Ammo7]);
	dini_IntSet(file,"Weapon 8",pInfo[playerid][Wep8]);
	dini_IntSet(file,"Ammo 8",pInfo[playerid][Ammo8]);
	dini_FloatSet(file,"Health",Health);
	dini_FloatSet(file,"Armour",Armour);
	pInfo[playerid][Registered] = 1;
	SendClientMessage(playerid,COLOR_YELLOW,"You Have Succesfully Registered");
	ShowPlayerDialog(playerid,9999,DIALOG_STYLE_LIST,"What's Your Gendre","Male\nFemale","Select","Cancel");
	}
	}
	if(dialogid == 246) //Logging
	{
	if(!response)
	{
	SendClientMessage(playerid,COLOR_RED,"You Have To Login In Order To Play!");
	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(response)
	{
 	if(udb_hash(inputtext) != dini_Int(file, "Password"))
 	{
 	SendClientMessage(playerid,COLOR_RED,"Wrong Password");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
 	}
 	else
 	{
 	SetPlayerMoney(playerid,dini_Int(file,"Money"));
 	SetPlayerScore(playerid,dini_Int(file,"Score"));
	pInfo[playerid][Kills] = dini_Int(file,"Kills");
	pInfo[playerid][Deaths] = dini_Int(file,"Deaths");
	SendClientMessage(playerid,COLOR_YELLOW,"You Have Successfully Logged In");
	pInfo[playerid][LoggedIn] = 1;
	if(strcmp(dini_Get(file,"Gendre"),"Male") == 0)
	{
	pInfo[playerid][Gendre] = Male;
	}
	else if(strcmp(dini_Get(file,"Gendre"),"Female") == 0)
	{
	pInfo[playerid][Gendre] = Female;
	}
	if(strcmp(dini_Get(file,"Test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	else if(strcmp(dini_Get(file,"test"),"test") == 0)
	{
	pInfo[playerid][test] = test;
	}
	pInfo[playerid][Age] = dini_Int(file,"Age");
	timeupdate = SetTimerEx("TimeOnServer",60000,1,"i",playerid);
	TimE[playerid] = dini_Int(file,"Time On Server");
	}
	}
 	}
 	if(dialogid == 9797)
 	{
 	if(!response) return SendClientMessage(playerid,COLOR_RED,"You Canceled");
 	if(response)
 	{
 	if(udb_hash(inputtext) != dini_Int(file, "Password"))
 	{
  	SendClientMessage(playerid,COLOR_RED,"Wrong Password");
 	ShowPlayerDialog(playerid,9797,DIALOG_STYLE_INPUT,"Password Change","Please Type Your Old Password :","Done","Cancel");
 	}
 	else
 	{
 	ShowPlayerDialog(playerid,9898,DIALOG_STYLE_INPUT,"Password Change","Please Type Your New Password :","Done","Cancel");
	}
	}
	}
	if(dialogid == 9999)
	{
	if(!response)
	{
	ShowPlayerDialog(playerid,9999,DIALOG_STYLE_LIST,"What's Your Gender","Male\nFemale","Select","Cancel");
	SendClientMessage(playerid,COLOR_RED,"You Have To Choose Your Gender");
	}
	if(response)
	{
	if(listitem == 0)
	{
	dini_Set(file,"Gender","Male");
	ShowPlayerDialog(playerid,1010,DIALOG_STYLE_INPUT,"Age","What's Your Age","Done","Cancel");
	}
	if(listitem == 1)
	{
	dini_Set(file,"Gender","Female");
	ShowPlayerDialog(playerid,1010,DIALOG_STYLE_INPUT,"Age","What's Your Age","Done","Cancel");
	}
	}
	}
	if(dialogid == 1010)
	{
	if(!response)
	{
	SendClientMessage(playerid,COLOR_RED,"You Have To Choose Your Age");
	ShowPlayerDialog(playerid,1010,DIALOG_STYLE_INPUT,"Age","What's Your Age","Done","Cancel");
	}
	if(response)
	{
	if(IsNumeric(inputtext))
	{
	dini_IntSet(file,"Age",strval(inputtext));
	ShowPlayerDialog(playerid,1111,DIALOG_STYLE_LIST,"What is your test?","test","Select","Cancel");
	}
	else
	{
	SendClientMessage(playerid,COLOR_RED,"Please Use Numbers");
	ShowPlayerDialog(playerid,1010,DIALOG_STYLE_INPUT,"Age","What's Your Age","Done","Cancel");
	}
    if(dialogid == 1111)
	{
	if(!response)
	{
	ShowPlayerDialog(playerid,1111,DIALOG_STYLE_LIST,"What's Your test","test","Select","Cancel");
	SendClientMessage(playerid,COLOR_RED,"You Have To Choose Your test");
	}
	if(response)
	{
	if(listitem == 0)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 1)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 2)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 3)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 4)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 5)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 6)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
	if(listitem == 7)
	{
	dini_Set(file,"test","test");
 	ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
 	}
 	}
 	}
	//ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
 	}
	return 1;
}
If I take this
Код:
}
 	}
 	}
	//ShowPlayerDialog(playerid,246,DIALOG_STYLE_INPUT,"Login","Please Type Your Password Below To Login","Login","Cancel");
	}
 	}
	return 1;
}
Then do this to it
Код:
}
 	}
 	}
	}
 	}
	return 1;
}
It messes up the script and gives me 26 errors, even if I remove a few of those brackets.
Reply


Messages In This Thread
26 Errors what the.... - by kujox222 - 17.06.2012, 04:24
Re: 26 Errors what the.... - by .FuneraL. - 17.06.2012, 04:29
Re: 26 Errors what the.... - by kujox222 - 17.06.2012, 04:32
Re: 26 Errors what the.... - by PinkFloydLover - 17.06.2012, 04:38
Re: 26 Errors what the.... - by Rudy_ - 17.06.2012, 04:40
Re: 26 Errors what the.... - by kujox222 - 17.06.2012, 04:43
Re: 26 Errors what the.... - by rachit_rocks - 17.06.2012, 04:58
Re: 26 Errors what the.... - by Dubya - 17.06.2012, 04:58
Re: 26 Errors what the.... - by kujox222 - 17.06.2012, 05:07

Forum Jump:


Users browsing this thread: 1 Guest(s)