Not creating the category
#1

I've installed a filterscript called GVM,
However, I'm trying to create a category within the machine.`
The command /createcategory is calling this function
Код:
		case DIALOG_CREATE_CATEGORY:
		{
			if(!IsPlayerAdmin(playerid)) return 1;
			if(!response) return 1;
			if(isnull(inputtext)) return ShowPlayerDialog(playerid, DIALOG_CREATE_CATEGORY, DIALOG_STYLE_INPUT, "{F1C40F}GVM: {FFFFFF}Create Category", "{E74C3C}Category name can't be empty.\n\n{FFFFFF}Choose a category name:", "Create", "Cancel");
			if(strlen(inputtext) > 24) return ShowPlayerDialog(playerid, DIALOG_CREATE_CATEGORY, DIALOG_STYLE_INPUT, "{F1C40F}GVM: {FFFFFF}Create Category", "{E74C3C}Category name can't be more than 24 characters.\n\n{FFFFFF}Choose a category name:", "Create", "Cancel");
		   
			stmt_bind_value(AddCategory, 0, DB::TYPE_STRING, inputtext, 24);
			if(stmt_execute(AddCategory)) {
				print("stmt_execute(AddCategory) successful");
				SendClientMessage(playerid, 0x3498DBFF, "GUN VENDING MACHINE: {FFFFFF}Category created.");
 
				new string[64];
				format(string, sizeof(string), "GUN VENDING MACHINE: {FFFFFF}Category ID: %d", db_last_insert_rowid(MachineDatabase));
				SendClientMessage(playerid, 0x3498DBFF, string);
			}else{
				SendClientMessage(playerid, 0xE74C3CFF, "ERROR: {FFFFFF}Category creation failed.");
			}
 
			return 1;
		}
It does show the Dialog, Allows me to put something in, however.
nothing happens whatever i do and the category is not being created does anyone have any suggestion on what i could check, i tried adding a debug console message that is also not being executed.

Edit:
The entire removecategory is not working let me debug more.
Reply
#2

Probably mess with dialog ids.
Reply
#3

I've checked the code over and over, there does not seems to be an issue with the dialogids'.
using this filterscript : forum.sa-mp.com/showthread.php?t=606859
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)