SA-MP Forums Archive
inputtext bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: inputtext bug (/showthread.php?tid=201994)



inputtext bug - admantis - 23.12.2010

Hello all I have this script
pawn Код:
if (dialogid == 85)
    {
        new string[50];
        PlayerInfo[playerid][pAge] = inputtext;
        format(string, sizeof(string), "Ok, so you have %d", PlayerInfo[playerid][pAge]);
        SendClientMessage(playerid,0xFFFFFFFF, string);
    }
It says
Код:
Taurus.pwn(218) : error 006: must be assigned to an array
I tried
pawn Код:
PlayerInfo[playerid][pAge] = inputtext[0];
but Age is always 49 or 53 or any random number.
THANKS AND PLEASE!


Re: inputtext bug - Fj0rtizFredde - 23.12.2010

Try:
pawn Код:
PlayerInfo[playerid][pAge] = strval(inputtext);



Respuesta: inputtext bug - admantis - 23.12.2010

thanks it worked very much thanks