[Tutorial] How to use y_ini - Page 3
#1

Nice. Yesterday i tried to make a registration system for a simple gamemode.
Writing and reading actually works good.
The problem is when updating an existing file. I thought function ad INI_WriteInt would update (or if not existing add) a voice to a existing ini but when I do it it create a new voice. Where I'm wrong?

Quickly:
Player register -> Creating the file
Player login -> Reading the file (tested both and working)
Player disconnect -> Updating the file (Creating new voices)

Edit: Resolved, I forgot that I used TAG in registration and on update I don't mind it and saved without specifying TAGs. However nice tutorial
Reply
#2

d*mn, I don't get some points. Maybe can help me?
Reply
#3

Quote:
Originally Posted by marrcko
View Post
d*mn, I don't get some points. Maybe can help me?
You haven't asked a question.
Reply
#4

I'm having issues using INI_ParseFile with unknown file names (user files) but each file is a separate user, no tags. The function is
pawn Code:
LoadPlayer(playerid, name[], value[])
and I'm calling it with
pawn Code:
INI_ParseFile(file, "LoadPlayer", .bExtra = true, .extra = playerid); // file is formatted to "Users/Name.ini"
but its not loading properly. Could you clear this up please?
Reply
#5

Is the function public? If yes have you tried using "\" instead of "/"?
Reply
#6

That was it. I actually had it as "\" in the loading instance but "/" in the saving instance. Thanks.
Reply
#7

Quote:
Originally Posted by Y_Less
View Post
You haven't asked a question.
Well, I think more examples will help me. For example with custom file names, custom tags(if its possible), load/write from/in custom file.
Reply
#8

Custom files are just the same as the INI_ParseFile example, but using format first.
Reply
#9

how fix it?
Code:
public function lacks forward declaration (symbol "load_user_data_basic")
Btw, is 'basic' can ba changed into player or etc.?
Reply
#10

INI_Float saves the value to a variable, you can't use it in functions directly.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)