Y_INI - Saving problem
#1

(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!
Reply
#2

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?
Reply
#3

No, i just followed Kushs register tutorial step by step.
Reply
#4

BUMP
Reply
#5

https://sampforum.blast.hk/showthread.php?tid=352703
Reply
#6

I do not see any solution in that discussion, can you please clarify what did you meant?
Reply
#7

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?
Reply
#8

What more? I showed you everything needed. No more code in my gamemode corespond with this error.
Reply
#9

Please guys help me, i need to continue on my work on my gamemode.

BUMP
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)