[HELP]Pawn not responding
#1

Ok when i compile my dialog 24-7 thing its doesnt respond heres ma code
Код:
//---------------------------<[ OnDialogResponse ]>--------------------------------------------------------

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

	if(dialogid==1337) //This is our Dialog ID as shown in the command
	{

		switch(pPurchasingItem[playerid])
		{

			case ITEM_NONE: //This is the Dialog with the purchasing list, remember we set pPurchasingItem[playerid] to ITEM_NONE? this is why
			{

				if(!strcmp(inputtext,"Cell Phone",true))	//It's like commands, if the player chose the line with 'Cell Phone', then this is ran
				{
					pPurchasingItem[playerid]=ITEM_CELL_PHONE; //Now we're setting pPurchasingItem[playerid] to ITEM_CELL_PHONE for obvious reasons!
					ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","Purchase the Cell Phone for $150?","Yes","Nevermind");
					return 1;
				}

				if(!strcmp(inputtext,"Scratch Card",true))	//Scratch Card
				{
					//ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","","Yes","Nevermind"); //Finish the rest yourself
					pPurchasingItem[playerid]=ITEM_SCRATCH_CARD;
					return 1;
				}

			}

			case ITEM_CELL_PHONE: //The player is on the ITEM_CELL_PHONE Dialog now.
			{
				if(response) //if(Player Hits "Yes" Button)
				{
					//Check to see if player has enough money ($150)
					if(GetPlayerMoney(playerid)<150)return SendClientMessage(playerid,COLOR_GRAD2,"You do not have enough money!");


					//THIS CODE IS TAKEN DIRECTLY FROM THE ORIGINAL COMMAND, IT SHOULD BE EASY ENOUGH FOR YOU TO CREATE THE REST!!


					if(PlayerInfo[playerid][pTraderPerk] > 0)
			  		{
						new skill = 150 / 100;
						new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
						new payout = 150 - price;
			    			format(string, sizeof(string), "~r~-$%d", payout);
						GameTextForPlayer(playerid, string, 5000, 1);
						SafeGivePlayerMoney(playerid,- payout);
						SBizzInfo[9][sbTill] += payout;
						ExtortionSBiz(9, payout);
			  		}
			  		else
			  		{
			    		format(string, sizeof(string), "~r~-$%d", 150);
						GameTextForPlayer(playerid, string, 5000, 1);
						SafeGivePlayerMoney(playerid,-150);
						SBizzInfo[9][sbTill] += 150;
						ExtortionSBiz(9, 150);
			  		}
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new randphone = 100000 + random(899999);//minimum 1000 max 9999
					PlayerInfo[playerid][pPnumber] = randphone;
					format(string, sizeof(string), "  Mobile Phone Purchased your new Number is %d", randphone);
					SendClientMessage(playerid, COLOR_GRAD4, string);
					SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
					SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now type /help to see your cell phone commands.");



				}else{	//Else Player Hits "NeverMind" Button
					return SendClientMessage(playerid,COLOR_GRAD2,"Purchase canceled.");
				}
			}

			case ITEM_SCRATCH_CARD:
			{
				if(response)
				{

				}else{

				}
			}

		}

		return 1;
	}

	return 0;

}
	new sendername[MAX_PLAYER_NAME];
	new string[128];
	if(response)
	{
		if(dialogid == 12346 || dialogid == 12347)
		{
		  if(strlen(inputtext))
		  {
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerLogin(playerid,tmppass);
			}
			else
			{
				new loginstring[128];
				new loginname[64];
				GetPlayerName(playerid,loginname,sizeof(loginname));
				format(loginstring,sizeof(loginstring),"WRONG PASSWORD\nPlease enter the correct password:",loginname);
				ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
				gPlayerLogTries[playerid] += 1;
				if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
			}
		}
		if(dialogid == 12345)
		{
		  if(strlen(inputtext))
		  {
				GetPlayerName(playerid, sendername, sizeof(sendername));
			   format(string, sizeof(string), "users/%s.ini", sendername);
				new File: hFile = fopen(string, io_read);
				if (hFile)
				{
					SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
					fclose(hFile);
					return 1;
				}
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
			}
			else
			{
 				new regstring[128];
				new regname[64];
				GetPlayerName(playerid,regname,sizeof(regname));
				format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);
				ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
			}
		}
	}
	else
	{
		Kick(playerid);
	}
	return 1;
}
Reply
#2

Help me plz
Reply
#3

HELP
Reply
#4

stop bumping your topic every half hour

could it be these empty statements ?
Код:
case ITEM_SCRATCH_CARD:
			{
				if(response)
				{

				}else{

				}
			}
Reply
#5

you had 1 more } than needed...
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{

	if(dialogid==1337) //This is our Dialog ID as shown in the command
	{

		switch(pPurchasingItem[playerid])
		{

			case ITEM_NONE: //This is the Dialog with the purchasing list, remember we set pPurchasingItem[playerid] to ITEM_NONE? this is why
			{

				if(!strcmp(inputtext,"Cell Phone",true))	//It's like commands, if the player chose the line with 'Cell Phone', then this is ran
				{
					pPurchasingItem[playerid]=ITEM_CELL_PHONE; //Now we're setting pPurchasingItem[playerid] to ITEM_CELL_PHONE for obvious reasons!
					ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","Purchase the Cell Phone for $150?","Yes","Nevermind");
					return 1;
				}

				if(!strcmp(inputtext,"Scratch Card",true))	//Scratch Card
				{
					//ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","","Yes","Nevermind"); //Finish the rest yourself
					pPurchasingItem[playerid]=ITEM_SCRATCH_CARD;
					return 1;
				}

			}

			case ITEM_CELL_PHONE: //The player is on the ITEM_CELL_PHONE Dialog now.
			{
				if(response) //if(Player Hits "Yes" Button)
				{
					//Check to see if player has enough money ($150)
					if(GetPlayerMoney(playerid)<150)return SendClientMessage(playerid,COLOR_GRAD2,"You do not have enough money!");


					//THIS CODE IS TAKEN DIRECTLY FROM THE ORIGINAL COMMAND, IT SHOULD BE EASY ENOUGH FOR YOU TO CREATE THE REST!!


					if(PlayerInfo[playerid][pTraderPerk] > 0)
			  		{
						new skill = 150 / 100;
						new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
						new payout = 150 - price;
			    			format(string, sizeof(string), "~r~-$%d", payout);
						GameTextForPlayer(playerid, string, 5000, 1);
						SafeGivePlayerMoney(playerid,- payout);
						SBizzInfo[9][sbTill] += payout;
						ExtortionSBiz(9, payout);
			  		}
			  		else
			  		{
			    		format(string, sizeof(string), "~r~-$%d", 150);
						GameTextForPlayer(playerid, string, 5000, 1);
						SafeGivePlayerMoney(playerid,-150);
						SBizzInfo[9][sbTill] += 150;
						ExtortionSBiz(9, 150);
			  		}
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new randphone = 100000 + random(899999);//minimum 1000 max 9999
					PlayerInfo[playerid][pPnumber] = randphone;
					format(string, sizeof(string), "  Mobile Phone Purchased your new Number is %d", randphone);
					SendClientMessage(playerid, COLOR_GRAD4, string);
					SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
					SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now type /help to see your cell phone commands.");



				}else{	//Else Player Hits "NeverMind" Button
					return SendClientMessage(playerid,COLOR_GRAD2,"Purchase canceled.");
				}
			}

			case ITEM_SCRATCH_CARD:
			{
				if(response)
				{

				}else{

				}
			}

		}

		return 1;
	}
	new sendername[MAX_PLAYER_NAME];
	new string[128];
	if(response)
	{
		if(dialogid == 12346 || dialogid == 12347)
		{
		  if(strlen(inputtext))
		  {
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerLogin(playerid,tmppass);
			}
			else
			{
				new loginstring[128];
				new loginname[64];
				GetPlayerName(playerid,loginname,sizeof(loginname));
				format(loginstring,sizeof(loginstring),"WRONG PASSWORD\nPlease enter the correct password:",loginname);
				ShowPlayerDialog(playerid,12347,DIALOG_STYLE_INPUT,"Login",loginstring,"Login","Exit");
				gPlayerLogTries[playerid] += 1;
				if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
			}
		}
		if(dialogid == 12345)
		{
		  if(strlen(inputtext))
		  {
				GetPlayerName(playerid, sendername, sizeof(sendername));
			   format(string, sizeof(string), "users/%s.ini", sendername);
				new File: hFile = fopen(string, io_read);
				if (hFile)
				{
					SendClientMessage(playerid, COLOR_YELLOW, "That Username is already taken, please choose a different one.");
					fclose(hFile);
					return 1;
				}
				new tmppass[64];
				strmid(tmppass, inputtext, 0, strlen(inputtext), 255);
				Encrypt(tmppass);
				OnPlayerRegister(playerid,tmppass);
			}
			else
			{
 				new regstring[128];
				new regname[64];
				GetPlayerName(playerid,regname,sizeof(regname));
				format(regstring,sizeof(regstring),"Welcome, %s\nYou dont have an account.\nPlease register:",regname);
				ShowPlayerDialog(playerid,12345,DIALOG_STYLE_INPUT,"Register",regstring,"Register","Exit");
			}
		}
	}
	else
	{
		Kick(playerid);
	}
	return 1;
}
Reply
#6

Ok what did i do wrong?
Reply
#7

Ok now i get 26errors i think i did the { wrong but figure out
Код:
 public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new sendername[MAX_PLAYER_NAME];
	new string[128];
		if(dialogid==1337) //This is our Dialog ID as shown in the command
	{

		switch(pPurchasingItem[playerid])
		{

			case ITEM_NONE: //This is the Dialog with the purchasing list, remember we set pPurchasingItem[playerid] to ITEM_NONE? this is why
			{

		

				if(!strcmp(inputtext,"Cell Phone",true))	//It's like commands, if the player chose the line with 'Cell Phone', then this is ran
				{
					pPurchasingItem[playerid]=ITEM_CELL_PHONE; //Now we're setting pPurchasingItem[playerid] to ITEM_CELL_PHONE for obvious reasons!
					ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","Purchase the Cell Phone for $150?","Yes","Nevermind");
				return 1;
				}

      case ITEM_CELL_PHONE: //The player is on the ITEM_CELL_PHONE Dialog now.
			{
				if(response) //if(Player Hits "Yes" Button)
				{
					//Check to see if player has enough money ($150)
					if(GetPlayerMoney(playerid)<150)return SendClientMessage(playerid,COLOR_GRAD2,"You do not have enough money!");


					//THIS CODE IS TAKEN DIRECTLY FROM THE ORIGINAL COMMAND, IT SHOULD BE EASY ENOUGH FOR YOU TO CREATE THE REST!!


					if(PlayerInfo[playerid][pTraderPerk] > 0)
			  		{
						new skill = 150 / 100;
						new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
						new payout = 150 - price;
			    			format(string, sizeof(string), "~r~-$%d", payout);
						GameTextForPlayer(playerid, string, 5000, 1);
						SafeGivePlayerMoney(playerid,- payout);
						SBizzInfo[9][sbTill] += payout;
						ExtortionSBiz(9, payout);
			  		}
			  		else
			  		{
			    		format(string, sizeof(string), "~r~-$%d", 150);
						GameTextForPlayer(playerid, string, 5000, 1);
						SafeGivePlayerMoney(playerid,-150);
						SBizzInfo[9][sbTill] += 150;
						ExtortionSBiz(9, 150);
			  		}
					PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
					new randphone = 100000 + random(899999);//minimum 1000 max 9999
					PlayerInfo[playerid][pPnumber] = randphone;
					format(string, sizeof(string), "  Mobile Phone Purchased your new Number is %d", randphone);
					SendClientMessage(playerid, COLOR_GRAD4, string);
					SendClientMessage(playerid, COLOR_GRAD5, "You can check this anytime by Typing /stats");
					SendClientMessage(playerid, COLOR_WHITE, "HINT: You can now type /help to see your cell phone commands.");



				}else{	//Else Player Hits "NeverMind" Button
					 SendClientMessage(playerid,COLOR_GRAD2,"Purchase canceled.");
					 return 1;
				}
			}

				if(!strcmp(inputtext,"Scratch Card",true))	//Scratch Card
				{
					ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","","Yes","Nevermind"); //Finish the rest yourself
					pPurchasingItem[playerid]=ITEM_SCRATCH_CARD;
					return 1;
						}
}


     	
		if(!strcmp(inputtext,"Phone Book",true))	//Scratch Card
				{
					ShowPlayerDialog(playerid,1337,DIALOG_STYLE_MSGBOX,"Purchase?","","Yes","Nevermind"); //Finish the rest yourself
					pPurchasingItem[playerid]=ITEM_PHONE_BOOK;
					return 1;
				}
				{





			case ITEM_PHONE_BOOK: //The player is on the ITEM_CELL_PHONE Dialog now.
			{
				if(response) //if(Player Hits "Yes" Button)
				{
					//Check to see if player has enough money ($10)
					if(GetPlayerMoney(playerid)<150)return SendClientMessage(playerid,COLOR_GRAD2,"You do not have enough money!");


					//THIS CODE IS TAKEN DIRECTLY FROM THE ORIGINAL COMMAND, IT SHOULD BE EASY ENOUGH FOR YOU TO CREATE THE REST!!

			

if(PlayerInfo[playerid][pTraderPerk] > 0)
			  {
					new skill = 10 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 10 - price;
					SafeGivePlayerMoney(playerid,- payout);
					SBizzInfo[9][sbTill] += payout;
					ExtortionSBiz(9, payout);
					GameTextForPlayer(playerid, "~r~-$10", 5000, 1);
				}
				else
				{
				  SafeGivePlayerMoney(playerid,- 10);
					SBizzInfo[9][sbTill] += 10;
					ExtortionSBiz(9, 10);
					format(string, sizeof(string), "~r~-$%d", 100);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
        PlayerInfo[playerid][pPhoneBook] = 1;
				format(string, sizeof(string), "  Phone Book Purchased you can look up any Players Number !");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /number <id/name>.");
				}else{	//Else Player Hits "NeverMind" Button
					 SendClientMessage(playerid,COLOR_GRAD2,"Purchase canceled.");
					 return 1;
				}
			}
			
		


			case ITEM_Dice: //The player is on the ITEM_CELL_PHONE Dialog now.
			{
				if(response) //if(Player Hits "Yes" Button)
				{
					//Check to see if player has enough money ($2)
					if(GetPlayerMoney(playerid)<150)return SendClientMessage(playerid,COLOR_GRAD2,"You do not have enough money!");


					//THIS CODE IS TAKEN DIRECTLY FROM THE ORIGINAL COMMAND, IT SHOULD BE EASY ENOUGH FOR YOU TO CREATE THE REST!!

		
			  if(PlayerInfo[playerid][pTraderPerk] > 0)
			  {
					new skill = 10 / 100;
					new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
					new payout = 10 - price;
					SafeGivePlayerMoney(playerid,- payout);
					SBizzInfo[9][sbTill] += payout;
					ExtortionSBiz(9, payout);
					format(string, sizeof(string), "~r~-$%d", payout);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				else
				{
				  SafeGivePlayerMoney(playerid,-10);
					SBizzInfo[9][sbTill] += 10;
					ExtortionSBiz(9, 10);
					format(string, sizeof(string), "~r~-$%d", 1);
					GameTextForPlayer(playerid, string, 5000, 1);
				}
				PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
				gDice[playerid] = 1;
				format(string, sizeof(string), "  Dice Purchased you can throw your Dice.");
				SendClientMessage(playerid, COLOR_GRAD4, string);
				SendClientMessage(playerid, COLOR_WHITE, "HINT: Type /dice ");
				}else{	//Else Player Hits "NeverMind" Button
					 SendClientMessage(playerid,COLOR_GRAD2,"Purchase canceled.");
				}  return 1;
  }
Код:
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2251) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2280) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2316) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2317) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2344) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2631) : warning 235: public function lacks forward declaration (symbol "StopAnim")
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2671) : warning 235: public function lacks forward declaration (symbol "hospital")
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2678) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2718) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2729) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2741) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2745) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2757) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2761) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2765) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2769) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2773) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2777) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2781) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2785) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2797) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2801) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2805) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2809) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2813) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2825) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2829) : error 004: function "PlayerToPoint" is not implemented
C:\DOCUME~1\Lilc\MYDOCU~1\HRP\GAMEMO~1\hrp32.pwn(2833) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)