SA-MP Forums Archive
How would i do this right? - 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: How would i do this right? (/showthread.php?tid=132072)



How would i do this right? - Torran - 06.03.2010

pawn Код:
AccountInfo[playerid][Year] = inputtext;
Код:
C:\Users\Torran\Desktop\tRoleplay\gamemodes\tRoleplay.pwn(1465) : error 006: must be assigned to an array
How would i save to the users file whatever the person types on dialog = inputtext;


Re: How would i do this right? - Eazy_Efolife - 06.03.2010

Код:
strmid(AccountInfo[playerid][Year], inputtext, 0, strlen(inputtext), 255);



Re: How would i do this right? - Torran - 06.03.2010

Thanks errors gone nw


Re: How would i do this right? - smeti - 06.03.2010

Quote:
Originally Posted by Torran
pawn Код:
AccountInfo[playerid][Year] = inputtext;
Integer:
pawn Код:
enum blabla
{
    Year  // integer
}
new AccountInfo[MAX_PLAYERS][blabla];
AccountInfo[playerid][Year] = strval(inputtext);
String:
pawn Код:
enum blabla
{
    Year[32]  // string
}
new AccountInfo[MAX_PLAYERS][blabla];
strmid(AccountInfo[playerid][Year], inputtext, 0, strlen(inputtext), 128);