#1

hello, yesterday i found 2 functions about dini and i didn't realy understand what they're doing.
can you please explain it to me?
Code:
pawn Код:
stock dini_PRIVATE_ExtractKey(line[]){
    new tmp[255]; tmp[0]=0;
    if(strfind(line,"=",true)==-1) return tmp;
    set(tmp,strlower(ret_memcpy(line,0,strfind(line,"=",true))));
    return tmp;}


stock dini_PRIVATE_ExtractValue(line[]){
    new tmp[255];
    tmp[0]=0;
    if(strfind(line,"=",true)==-1){
        return tmp;}
    set(tmp,ret_memcpy(line,strfind(line,"=",true)+1,strlen(line)));
    return tmp;}
Reply
#2

At first glance, I would say if you had something like this in a file:
Код:
Money=5000
The first function would return "Money", the second would return 5000.
Reply
#3

ok, thx!
how can it know in wich file to look for?
because we only insert one Var (parameter)...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)