SA-MP Forums Archive
Banking system with MYSQL - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Banking system with MYSQL (/showthread.php?tid=550797)



Banking system with MYSQL - MrViolence101 - 14.12.2014

Hey guys, so i made a banking system with mysql awhile ago and when i went to test it on my localhost everything works. i Can check the balance of the bank account, i can withdraw and i can deposit. On my current hosting server (internet) i test it. I checked my balance and its suppose to open a dialog and when i clicked on balance the server crashes and then immediately starts up again. Does any know what the problem might be.


Re: Banking system with MYSQL - DaTa[X] - 14.12.2014

Post OnDialogResponse code..


Re: Banking system with MYSQL - MrViolence101 - 14.12.2014

Код:
 case DIALOG_BANK:
		{
			if(response) 
			{
				switch(listitem)
				{
					case 0:
					{
						new result[90];
						format(result, sizeof(result), "{FFFFFF}Your current bank balance is {CC6600}$%d", pInfo[playerid][Bank]);
						ShowPlayerDialog(playerid, DIALOG_BBALANCE, DIALOG_STYLE_MSGBOX, "Bank Balance", result, "Ok", "Close");						
					}		
					case 1:
					{
						ShowPlayerDialog(playerid, DIALOG_BDEPOSIT, DIALOG_STYLE_INPUT, "Deposit Money", "How much money do you want to deposit into the bank?","Ok","Cancel");
					}
					case 2: 
					{
						ShowPlayerDialog(playerid, DIALOG_BWITHDRAW, DIALOG_STYLE_INPUT, "Withdraw Money", "How much money do you want to withdraw from the bank?","Ok","Cancel");
					}
							
				}
			
			}
the first case is the dialog that pops up that shows the balance, its when i choose the balance option it crashes.