Dialog Response getting error (Invalid expression assumed 0)
#1

Code:
if(dialogid == 22 && response)
	{
		new cashdeposit = strval(inputtext[]);
		new droppername[MAX_PLAYER_NAME];
		GetPlayerName(playerid, droppername, sizeof(droppername));

		if(cashdeposit <= 0)
		{
			return 1;
		}
		
		if(cashdeposit > PlayerInfo[playerid][pPot])
		{
			ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "House Safes by:Qeux", "You Don't have that much Pot with you", "Done", "Close");
			return 1;
		}
		PlayerInfo[playerid][pPot] -= cashdeposit;
		PlayerInfo[playerid][pSafePot] += cashdeposit;
		format(string, sizeof(string), "%s places some drugs in a safe.", droppername);
		ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "House Safes by:Qeux", string, "Done", "Close");
		ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		printf("%s", string);
		return 1;
	}
this is basically for someone placing drugs into their safe... i'm getting an error on this part
Code:
new cashdeposit = strval(inputtext[]);
do you see why this would be an invalid expression.. i'm guessing because i don't fully understand inputtext[]... basically they are entering a multiple digit number and i want that number toe be equal to cashdeposit so i can withdraw and deposit stuff...
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)