SA-MP Forums Archive
[SOLVED] Cannot save a name with dini? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] Cannot save a name with dini? (/showthread.php?tid=97282)



[SOLVED] Cannot save a name with dini? - spyr0x - 13.09.2009

I'm trying to create a property system where the name will be saved on the property.. But dini wont save the player name?

pawn Код:
format(ids,sizeof(ids),"%d", id);
if(dini_Int("propertyowners.ini",ids)==0) {
dini_IntSet("propertyowners.ini",ids,PlayerName(playerid)); <-- Error line
Error:
pawn Код:
error 035: argument type mismatch (argument 3)



Re: [HELP] Cannot save a name with dini? - Calgon - 13.09.2009

I don't see why you're formatting a string to be the same as it was prior to editing.

And the player name is not an Integer, thus causing the error.

dini_IntSet(filename, value, int_to_change);


Re: [SOLVED] Save name with dini.. - spyr0x - 13.09.2009

Ahh... I'm so stupid -.- Kinda tired.. PROBLEM SOLVED!