[Help] Y_INI + Y_INLINE problem at loading single string.
#5

Quote:
Originally Posted by ******
Посмотреть сообщение
INI_ParseFile takes a string format, not a function directly, so you don't need the "using inline" part in this case. Also, currently your code entirely ignores tags, so they will ALL be loaded by that one function.
I didnt actually get what you tryed to say in here.
Why my code ignoring tags?
Quote:
Originally Posted by JuanStone
Посмотреть сообщение
You should first make sure you know what you want to upload, the code that you left off is good, the only error is what said Y_lees.

PHP код:
public OnPlayerConnect(playerid)
{
    new 
name[MAX_PLAYER_NAME+1], str[126];
    
GetPlayerName(playeridnamesizeof(name));
    
    
inline SingleString(string:name[], string:value[])
    {
        
INI_String("pName"str126);
    }
    
INI_ParseFile(name"SingleString");
    return 
true;

That would be the correct code but you should bear in mind that you are loading the value of "pname" in a local string, to return to use it would have to reload it, apart from the file should be as follows: "server/scriptfiles/%s.ini"

I don't know what makes your code in reality, I believe that loads the name for the route and reload in a variable.

This would be a code more comfortable.

PHP код:
public OnPlayerConnect(playerid)
{
    
inline loaddatauser(string:name[], string:value[])
    {
        
INI_String("", var, size);
        
// more data players..
    
}
    
INI_ParseFile(FolderRuta(playerid), "loaddatauser");
    return 
true;
}
FolderRuta(playerid)
{
    new 
string[39], name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnamesizeof(name));
    
format(stringsizeof(string), "/Folder/%s.ini"name);
    return 
string;

ive tryed that, the verb still not getting formated by the file.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)