SA-MP Forums Archive
y_ini - 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)
+--- Thread: y_ini (/showthread.php?tid=513058)



y_ini - AroseKhanNiazi - 14.05.2014

Код:
forward loadaccount_Players_Data(playerid, name[], value[]);
public loadaccount_Players_Data(playerid, name[], value[])
{
    INI_String("Name", pInfo[playerid][playername]);
    INI_String("Password", pInfo[playerid][Pass],129);
Give me error undefined symbol INI_String only for the Name one password one line works fine


Re: y_ini - ]Rafaellos[ - 14.05.2014

pawn Код:
INI_String("Name", pInfo[playerid][playername], sizeof(pInfo[playerid][playername]))
Because you need the size...


Re: y_ini - AroseKhanNiazi - 14.05.2014

didn't work


Re: y_ini - SAMProductions - 14.05.2014

Try this :-
pawn Код:
forward loadaccount_Players_Data(playerid, name[], value[]);
public loadaccount_Players_Data(playerid, name[], value[])
{
    INI_String("Name", pInfo[playerid][playername], sizeof(pInfo[playerid][playername]);
    INI_String("Password", pInfo[playerid][Pass], 129);
Код:
INI_String(name[], variable , length );
Because if you don't use Length, you might get Undefined Symbol.


Re: y_ini - AroseKhanNiazi - 14.05.2014

pawn Код:
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : error 017: undefined symbol "INI_String"
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : error 001: expected token: "]", but found "-identifier-"
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : warning 215: expression has no effect
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : error 001: expected token: ";", but found "]"
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : fatal error 107: too many error messages on one line
ERROR LINE IS
pawn Код:
INI_String("Name", pInfo[playerid][playername], sizeof(pInfo[playerid][playername]);



Re: y_ini - SAMProductions - 14.05.2014

Try, not tested yet :-
pawn Код:
forward loadaccount_Players_Data(playerid, name[], value[]);
public loadaccount_Players_Data(playerid, name[], value[])
{
    INI_String("Name", pInfo[playerid][playername], 24);
    INI_String("Password", pInfo[playerid][Pass], 129);



Re: y_ini - AroseKhanNiazi - 14.05.2014

now this
pawn Код:
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : error 001: expected token: ")", but found "["
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : warning 215: expression has no effect
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : error 001: expected token: ";", but found "]"
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : error 029: invalid expression, assumed zero
E:\Game Modes\1v1_DM_Server\gamemodes\test.pwn(4268) : fatal error 107: too many error messages on one line



Re: y_ini - Konstantinos - 14.05.2014

Does playername in the enum has size of 24 or any size at all?


Re: y_ini - AroseKhanNiazi - 14.05.2014

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Does playername in the enum has size of 24 or any size at all?
thanks man i forgot about it