if(dialogid == 6121) { if(response) { if(strlen(inputtext) >= 2 && strlen(inputtext) <= 32) { new string[128], iFac; format(string, sizeof(string), "You have renamed faction ID %i and named it %s!", arrFaction[iFac][g_FactionID] = 0, strlen(inputtext)); SendClientMessageEx(playerid, COLOR_WHITE, string); CreateDynamicFaction(strlen(inputtext)); SaveDynamicFaction(); } else return ShowPlayerDialog(playerid,6123,DIALOG_STYLE_INPUT, " Edit Groups:", "To enable radio access, input: 1 | To disable radio access, input 2\n\n(To reset the radio access, enter 255).", "Select", "Ok"); } } |
if(dialogid == 6783) { if(response) { new string[128], iFac; if(listitem == 0) //ID 0 Faction Name { format(string, 6121, "Enter the faction name you wish to name this faction with.\n(TIP: The name cannot be more than 32 characters.)", arrFaction[iFac][g_szFactionName], arrFaction[iFac][g_FactionID] = 0, arrFaction[iFac][g_iRadioAccess]); ShowPlayerDialog(playerid, 6121, DIALOG_STYLE_INPUT, "Edit Faction: Faction Name", string, "Select", "Close"); } if(listitem == 1) //ID 0 Radio Access { format(string, 6123, "To enable radio access, input: 1 | To disable radio access, input 2\n\n(TIP: To reset the radio access, enter 255).", arrFaction[iFac][g_szFactionName], arrFaction[iFac][g_FactionID] = 1, arrFaction[iFac][g_iRadioAccess]); ShowPlayerDialog(playerid, 6123, DIALOG_STYLE_INPUT, "Edit Faction: Radio Access", string, "Select", "Close"); } } } |
CreateDynamicFaction(strlen(inputtext));
CreateDynamicFaction(inputtext);
CreateDynamicFaction(345343);
format(string, sizeof(string), "You have renamed faction ID %i and named it %s!", arrFaction[iFac][g_FactionID] = 0, strlen(inputtext));
format(string, sizeof(string), "You have renamed faction ID %i and named it %s!", arrFaction[iFac][g_FactionID] = 0, inputtext);
format(string,sizeof(string),"You've changed the faction name to %s.", inputtext);//with inputtext, not strlen(inputext)
(5273) : error 035: argument type mismatch (argument 1) |
CreateDynamicFaction(inputtext); |
CreateDynamicFaction (inputtext);
CreateDynamicFaction(iFac) { new Filename[64], line[256]; format(Filename, sizeof(Filename), FACTION_SYSTEM_File_PATH "%s_%d.ini", arrFaction[iFac][g_szFactionName], iFac); new File:handle = fopen(Filename, io_write); format(line, sizeof(line), "Faction Name=%s\r\n", arrFaction[iFac][g_szFactionName]); fwrite(handle, line); format(line, sizeof(line), "Faction ID=%i\r\n", arrFaction[iFac][g_FactionID] = iFac); fwrite(handle, line); format(line, sizeof(line), "Locker VW=%d\r\n", arrFaction[iFac][g_iLockerVW]); fwrite(handle, line); format(line, sizeof(line), "Faction Type=%d\r\n", arrFaction[iFac][g_iFactionType]); fwrite(handle, line); format(line, sizeof(line), "Locker Guns=%i\r\n", arrFaction[iFac][g_iLockerGuns]); fwrite(handle, line); format(line, sizeof(line), "Locker Costing=%i\r\n", arrFaction[iFac][g_iLockerCost]); fwrite(handle, line); format(line, sizeof(line), "Allegiance=%d\r\n", arrFaction[iFac][g_iAllegiance]); fwrite(handle, line); format(line, sizeof(line), "Radio Access=%d\r\n", arrFaction[iFac][g_iRadioAccess]); fwrite(handle, line); format(line, sizeof(line), "Locker Stock=%i\r\n", arrFaction[iFac][g_iLockerStock]); fwrite(handle, line); fclose(handle); } |