03.10.2016, 22:59
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
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.
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; }
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.