07.10.2012, 04:59
I have this:
Its a post to create the text and put it in my Updates.ini file but instead it puts a '|', it even says you have changed the text to %s and then whatever inputted on the other dialog?
My CreateDynamicUpdates:
my enum:
+rep to anyone that can even help
Quote:
if(dialogid == 16516) { if(response) { if(strlen(inputtext) >= 2 && strlen(inputtext) <= 64) { arrUpdates[iUpd][g_Update1] = strlen(inputtext); format(string, sizeof(string), "You have change Update 1 to %s.", inputtext); SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string); CreateDynamicUpdates(strlen(inputtext)); SaveDynamicUpdates(); } else return ShowPlayerDialog(playerid, 16513, DIALOG_STYLE_LIST, "Update 1:", "Input text\nClear Update", "Select", "Cancel"); } } |
My CreateDynamicUpdates:
Код:
CreateDynamicUpdates(iUpd) { new Filename[64], line[256]; format(Filename, sizeof(Filename), "Updates.ini"); new File:handle = fopen(Filename, io_write); format(line, sizeof(line), "Update 1=%s\r\n", arrUpdates[iUpd][g_Update1]); fwrite(handle, line); format(line, sizeof(line), "Update 2=%s\r\n", arrUpdates[iUpd][g_Update2]); fwrite(handle, line); format(line, sizeof(line), "Update 3=%s\r\n", arrUpdates[iUpd][g_Update3]); fwrite(handle, line); format(line, sizeof(line), "Update 4=%s\r\n", arrUpdates[iUpd][g_Update4]); fwrite(handle, line); format(line, sizeof(line), "Update 5=%s\r\n", arrUpdates[iUpd][g_Update5]); fwrite(handle, line); format(line, sizeof(line), "Update 6=%s\r\n", arrUpdates[iUpd][g_Update6]); fwrite(handle, line); format(line, sizeof(line), "Update 7=%s\r\n", arrUpdates[iUpd][g_Update7]); fwrite(handle, line); format(line, sizeof(line), "Update 8=%s\r\n", arrUpdates[iUpd][g_Update8]); fwrite(handle, line); format(line, sizeof(line), "Update 9=%s\r\n", arrUpdates[iUpd][g_Update9]); fwrite(handle, line); format(line, sizeof(line), "Update 10=%s\r\n", arrUpdates[iUpd][g_Update10]); fwrite(handle, line); format(line, sizeof(line), "Update 11=%s\r\n", arrUpdates[iUpd][g_Update11]); fwrite(handle, line); format(line, sizeof(line), "Update 12=%s\r\n", arrUpdates[iUpd][g_Update12]); fwrite(handle, line); fclose(handle); }
Quote:
enum eUpdateSystem { g_Update1[64], g_Update2[64], g_Update3[64], g_Update4[64], g_Update5[64], g_Update6[64], g_Update7[64], g_Update8[64], g_Update9[64], g_Update10[64], g_Update11[64], g_Update12[64], g_Update13[64], g_Update14[64], g_Update15[64], }; |