Y_INI - Saving problem -
_GHT_MarK445 - 17.03.2015
(All important things such as variables, names and stuff will be marked BOLD)
Hey guys, i am here with another problem today.
I am using registration system by Kush, as i mentioned in the last problem topic, and i need help.
I have done my jobs, which are using
pJob every single job is different value, for example homeless is
0 cop is
1 and such.
Next i am setting their spawn positions and color and stuff like this in
OnPlayerSpawn
Код:
if(PlayerInfo[playerid][pJob] == 1)
{
stuff
}
it is working pretty fine.. i made an account, joined this job and disconnected. Than i logged again, and it perfectly spawned me into the position i set and it gave me the color i also set.
But.. when i left, and changed my name and joined again, so basically when i joined first time (when i joined cop job) i was
ID 0 when i left and joined with another name again i was again
ID 0, so when i joined with different name i spawned as a cop.
My friend told me, it is a
playerid problem but i am not sure, how to fix it.
I tried to reset his stats when he join in by using:
Код:
for(new i; pInfo: i < pInfo; i++) PlayerInfo[playerid][pInfo:i] = 0;
it reseted it.
Then i tried to put in the line from register system to load his password when he log in, that he is possible to login by adding:
Код:
INI_Int("Pass",PlayerInfo[playerid][pPass]);
but.. it showed me 2 same errors which was saying
error 017: undefined symbol "name"
error 017: undefined symbol "value"
i thinked about it, and i will now show you the load data thing, which from i selected the loading password line.
Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
//other stuff
INI_Int("Pass",PlayerInfo[playerid][pPass]);
}
so, as you are enable to see this:
,name[],value[]);
is probably the thing. But i am not sure, how to fix that errors which i mentioned, i mean.. i can insert public into public? So how to fix them? It is pretty messy error and hard for me, and i have no idea how to fix it.
The guy who will help me will earn reputation point from me, because it is really head-ache problem.
Thank you guys!
Re: Y_INI - Saving problem [ REP + ] -
Misiur - 17.03.2015
Easier looping through an enum.
pawn Код:
for(new pInfo:i; i < pInfo; i++) PlayerInfo[playerid][i] = 0;
Quote:
Then i tried to put in the line from register system to load his password when he log in, that he is possible to login by adding
|
I'm sorry, but that sentence is really hard to grasp.
Are you following some kind of Y_Ini tutorial?
Re: Y_INI - Saving problem [ REP + ] -
_GHT_MarK445 - 17.03.2015
No, i just followed Kushs register tutorial step by step.
Re: Y_INI - Saving problem [ REP + ] -
_GHT_MarK445 - 18.03.2015
BUMP
Re: Y_INI - Saving problem [ REP + ] -
KayJ - 18.03.2015
https://sampforum.blast.hk/showthread.php?tid=352703
Re: Y_INI - Saving problem [ REP + ] -
_GHT_MarK445 - 18.03.2015
I do not see any solution in that discussion, can you please clarify what did you meant?
AW: Re: Y_INI - Saving problem [ REP + ] -
Kaliber - 18.03.2015
Quote:
Originally Posted by _GHT_MarK445
I do not see any solution in that discussion, can you please clarify what did you meant?
|
Did you made an bracket error or post it into a function?!
Can you show us pls more code?
Re: Y_INI - Saving problem [ REP + ] -
_GHT_MarK445 - 18.03.2015
What more? I showed you everything needed. No more code in my gamemode corespond with this error.
Re: Y_INI - Saving problem [ REP + ] -
_GHT_MarK445 - 19.03.2015
Please guys help me, i need to continue on my work on my gamemode.
BUMP
Re: Y_INI - Saving problem [ REP + ] -
Misiur - 19.03.2015
OP, the problem is probably a syntax one, so please copy and paste exactly that part of code, and 10 lines surrounding it in both sides.