SA-MP Forums Archive
New To 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: New To Y_ini (/showthread.php?tid=572626)



New To Y_ini - NeverKnow - 30.04.2015

Hello guys, i am learning Y_ini, i followed up the Tutorial of making a login/register system.
but my question was this:

i did:

pawn Код:
//when the player is loggin in:
INI_ParseFile(UserPath(playerid), "LoadUser_LoginPlayer", .bExtra = true, .extra = playerid);

forward LoadUser_LoginPlayer(playerid,name[],value[]);
public LoadUser_LoginPlayer(playerid,name[],value[])
{
    INI_Int("Money",PlayerInfo[playerid][MoneyPlayer]);
    printf("LoadUser_LoginPlayer Money- %d", PlayerInfo[playerid][MoneyPlayer]);
    return 1;
}
but what i dont understand is.. why this is printing me 10 or more times on console but not once?

pawn Код:
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0
[16:21:15] LoadUser_LoginPlayer Money- 0



Re: New To Y_ini - trablon - 30.04.2015

Why don't you just use break function?

for instance:


pawn Код:
for(new i;i<MAX_PLAYERS;i++)
{
printf("Money: [%d]",GetPlayerMoney(i));
break;
}



Re: New To Y_ini - NeverKnow - 30.04.2015

i am learning Y_ini and trying to figure out what the system is doing, so i made printf to see how it works, but my question was, why is it printing like 10 times when the function is called once?

and i think you dont understand Y_ini aswell, so dont post please.


Re: New To Y_ini - ATGOggy - 30.04.2015

I don't know why it prints 10 or more times. But, it doesn't matter if it gets called once or more. You can use that callback to get information to variables. Don't use printf or SendClientMessage or timers there.


Re: New To Y_ini - trablon - 30.04.2015

Quote:
Originally Posted by NeverKnow
Посмотреть сообщение
i am learning Y_ini and trying to figure out what the system is doing, so i made printf to see how it works, but my question was, why is it printing like 10 times when the function is called once?

and i think you dont understand Y_ini aswell, so dont post please.
I do understand better than you, do not worry, i tried to help you and you are insulting me like "you don't understand so dont post please" what a bitch and thankless move!


Re: New To Y_ini - NeverKnow - 30.04.2015

Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
I don't know why it prints 10 or more times. But, it doesn't matter if it gets called once or more. You can use that callback to get information to variables. Don't use printf or SendClientMessage or timers there.
are you sure that it does not matter?
someone told me to use Y_ini in my server so everything will run smoother he sayd.

Checking a function 10 or more times will not make any lagg at all?

is this normal? does this also happen to you guys or only me?

Quote:
Originally Posted by trablon
Посмотреть сообщение
I do understand better than you, do not worry, i tried to help you and you are insulting me like "you don't understand so dont post please" what a bitch and thankless move!
i am sorry bro did not ment like that. thanks for trying to help me.


Re: New To Y_ini - Antoniohl - 30.04.2015

Quote:
Originally Posted by NeverKnow
Посмотреть сообщение
are you sure that it does not matter?
someone told me to use Y_ini in my server so everything will run smoother he sayd.

Checking a function 10 or more times will not make any lagg at all?

is this normal? does this also happen to you guys or only me?



i am sorry bro did not ment like that. thanks for trying to help me.
well, it doesn't make any lag at all, Y_INI is the best Saving / load data i've ever seen, it's after MySQL ofcourse.
and yeah it loads more than 20times.


Re: New To Y_ini - NeverKnow - 01.05.2015

Quote:
Originally Posted by Antoniohl
Посмотреть сообщение
well, it doesn't make any lag at all, Y_INI is the best Saving / load data i've ever seen, it's after MySQL ofcourse.
and yeah it loads more than 20times.
alright thanks for the info. i thought for a moment that this only happens to me, if this happens to you all, then everything is good


Re: New To Y_ini - Dragony92 - 01.05.2015

I asked ****** one time about that, it's normal, you probably have 19 entries in your user file?


Re: New To Y_ini - NeverKnow - 01.05.2015

Quote:
Originally Posted by Dragony92
Посмотреть сообщение
I asked ****** one time about that, it's normal, you probably have 19 entries in your user file?
yes this is correct

aight now i understand thanks!