Namechange problem
#1

Hey all. I have a problem with my changename script.

This dialog should change my pScreenName variable

pawn Код:
case DIALOG_CHANGENAME:
        {

            if(response)
            {
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, ""COL_WHITE"Email",""COL_RED"You have entered an invalid name.\n"COL_WHITE"Fill in your new name below. You're login name will be the same.\n This is just your screen-name.","Activate","Quit");
                SetPlayerName(playerid,inputtext);
                PlayerInfo[playerid][pScreenName] = inputtext[20];
                ShowPlayerDialog(playerid, DIALOG_CHANGENAMESUC, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_WHITE"You have {00FF22}successfully{FFFFFF} changed your name.","Ok","");
            }
            return 1;
        }
It does set the name but not in the variable

This is my stats string:

pawn Код:
format(String,sizeof(String),"\nMoney: %d\nControl Panel Used: %d\nScreen Name: %s",PlayerInfo[playerid][pCash],PlayerInfo[playerid][pCpUse],PlayerInfo[playerid][pScreenName]);
The Screen Name keeps being blanc. No errors or warnings.
What could be the problem now?

Update:
I know noticed that this line crashes my command:
PlayerInfo[playerid][pScreenName] = inputtext[20];

What could it be?
Reply


Messages In This Thread
Namechange problem - by bartje01 - 01.11.2011, 20:55
Re: Namechange problem - by Tigerkiller - 01.11.2011, 21:37
Re: Namechange problem - by bartje01 - 01.11.2011, 21:57
Re: Namechange problem - by bartje01 - 01.11.2011, 23:47
Re: Namechange problem - by Tigerkiller - 01.11.2011, 23:48
Re: Namechange problem - by bartje01 - 01.11.2011, 23:51
Re: Namechange problem - by SuperViper - 02.11.2011, 00:06
Re: Namechange problem - by bartje01 - 02.11.2011, 00:08
Re: Namechange problem - by Tigerkiller - 02.11.2011, 00:14
Re: Namechange problem - by bartje01 - 02.11.2011, 06:56

Forum Jump:


Users browsing this thread: 1 Guest(s)