SA-MP Forums Archive
Question about y_ini saving.. - 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: Question about y_ini saving.. (/showthread.php?tid=418946)



Question about y_ini saving.. - Scrillex - 26.02.2013

I have made Administration now I need to make a new saving file...

So if I use almost the same saving only with new enmu like gInfo etc

But If I use
Then I got str errors and new are defined multiple times...

pawn Код:
stock GPath(playerid)
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(str,sizeof(str),Path,name);
    return str;
}
pawn Код:
stock Path(playerid)
{
    new str[128],name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(str,sizeof(str),UserPath,name);
    return str;
}



Re: Question about y_ini saving.. - Bakr - 26.02.2013

You have a global variable somewhere with the name of "str". Change it (as it's a horrible variable name anyway).


Re: Question about y_ini saving.. - Scrillex - 26.02.2013

to string? if so then string will shadow too...


Re: Question about y_ini saving.. - Bakr - 26.02.2013

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
to string? if so then string will shadow too...
Variable names are limitless...

One more reasonable name would be g_string.


Re: Question about y_ini saving.. - Scrillex - 26.02.2013

And how I can define name in diffrent?