10.04.2014, 19:34
Trying to run this script. I have the exact same script in other places that works fine, but it seems to fail to run.
The part of the script that isn't running is this part...
And it seems to be this line that's causing the issue...
pawn Code:
if(dialogid == DIALOG_FACTION_RANKNAME) // Edit faction rank names
{
if(response)
{
if( strlen( inputtext ) < 1 )
{
SendClientMessageEx( playerid, COLOR_RED, "Name must be at least 1 character long." );
ShowPlayerDialog(playerid, DIALOG_FACTION_RANKNAME, DIALOG_STYLE_INPUT, "Edit Rank", "Enter the title for this rank.", "Save", "Cancel");
format(string, sizeof(string), "Listitem: %d | fac: %d",listitem,fac[playerid]);
SendClientMessageEx( playerid, COLOR_WHITE, string );
}
else
{
if( strlen(inputtext) >= 1 )
{
strmid(fRank[fac[playerid]][listitem], inputtext, 0, strlen(inputtext), 64);
new newname[128];
format(newname, sizeof(newname), "Changed rank name %s to %s.",fRank[fac[playerid]][listitem],inputtext);
format(string, sizeof(string), "Listitem: %d | fac: %d",listitem,fac[playerid]);
SendClientMessageEx( playerid, COLOR_WHITE, newname );
SendClientMessageEx( playerid, COLOR_WHITE, string );
SaveFactions();
return cmd_facedit(playerid, "nothing");
}
else
{
SendClientMessageEx( playerid, COLOR_WHITE, "Name must be longer than 1 character." );
}
}
}
else return cmd_facedit(playerid, "nothing");
}
pawn Code:
strmid(fRank[fac[playerid]][listitem], inputtext, 0, strlen(inputtext), 64);
new newname[128];
format(newname, sizeof(newname), "Changed rank name %s to %s.",fRank[fac[playerid]][listitem],inputtext);
format(string, sizeof(string), "Listitem: %d | fac: %d",listitem,fac[playerid]);
SendClientMessageEx( playerid, COLOR_WHITE, newname );
SendClientMessageEx( playerid, COLOR_WHITE, string );
SaveFactions();
return cmd_facedit(playerid, "nothing");
pawn Code:
strmid(fRank[fac[playerid]][listitem], inputtext, 0, strlen(inputtext), 64);