25.04.2013, 12:43
I copied your code and edited it but it gives me
in the red line
Quote:
C:\Users\x3990.003\Desktop\samp server\gamemodes\PZ.pwn(1671) : error 008: must be a constant expression; assumed zero |
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new string[124]; switch(dialogid) { case 1: { if(!response) return Kick(playerid); if(strlen(inputtext) < 6 || strlen(inputtext) > 32) { SendClientMessage(playerid, COL_GREY, "Please enter a password that is greater than 6 characters or less than 32 characters."); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "Welcome to "ServerName"", "Enter your desired password below to sucessfully register.", "Continue", "Cancel"); return 1; } else { RegisterPlayer(playerid, inputtext); PlayerVar[playerid][Authenticated] = 1; format(PlayerVar[playerid][Name], MAX_PLAYER_NAME, GetPlayersNameWithUnderScore(playerid)); format(PlayerVar[playerid][Password], 32, "%s", inputtext); format(PlayerVar[playerid][Accent], 32, "American"); GetPlayerIp(playerid, PlayerVar[playerid][IP], 32); } } case 2: { if(!response) return Kick(playerid); format(string, sizeof(string), "PlayerAccounts/%s.ini", GetPlayersNameWithUnderScore(playerid)); if(fexist(string)) { if(!strcmp(PlayerVar[playerid][Password], inputtext , false)) { INI_ParseFile(string, "LoadPlayer_%s", .bExtra = true, .extra = playerid); PlayerVar[playerid][Authenticated] = 1; LoginPlayer(playerid); } else { SendClientMessage(playerid, COL_GREY, "The password you entered does not match, please reconnect for another try."); Kick(playerid); } } } case DIALOG_SEARCH: { if(response) { if(listitem == 0) // WP crate { SendClientMessage(playerid, COL_GREY, "The weapon crate has been marked on your map."); } if(listitem == 1) // Grocery store { SendClientMessage(playerid, COL_GREY, "The grocery store has been marked on your map."); } if(listitem == 2) // Hospital { SendClientMessage(playerid, COL_GREY, "The hospital has been marked on your map."); } if(listitem == 3) // Fire department { SendClientMessage(playerid, COL_GREY, "The fire department has been marked on your map."); } } } } return 1; }