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)
+--- Thread: Dini (
/showthread.php?tid=287562)
Dini -
omer5198 - 03.10.2011
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;}
Re: Dini -
PowerPC603 - 03.10.2011
At first glance, I would say if you had something like this in a file:
The first function would return "Money", the second would return 5000.
Re: Dini -
omer5198 - 03.10.2011
ok, thx!
how can it know in wich file to look for?
because we only insert one Var (parameter)...