[y_ini]Loading code params - 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: [y_ini]Loading code params (
/showthread.php?tid=626752)
[y_ini]Loading code params -
DeadMasterBG - 19.01.2017
Hello guys
i'm working from V.I.P Code when you redeem it you grand VIP Level...
My problem i can't load V.I.P Level and V.I.P Owner from file...
There is VIP Code file...
File name is Code - 658n61OHUo
Код:
Code = 658n61OHUo
Level = 1
Owner = DeadMasterBG
Buyer = DeadMasterBG
Write what are you need to show... and i'll show it...
Re: [y_ini]Loading code params -
Misiur - 19.01.2017
Well, for starters show the code you use to try loading this file
Re: [y_ini]Loading code params -
DeadMasterBG - 20.01.2017
Код:
public VIPCode_data(inputtext, name[], value[])
{
INI_String("Code", RedeemVIPCode,10);
INI_Int("Level", RedeemVIPCodeLevel);
INI_String("Owner", RedeemVIPCodeOwner,40);
INI_String("Buyer", RedeemVIPCodeBuyer,40);
return 1;
}
Код:
INI_ParseFile(code, "VIPCode_%s");
Re: [y_ini]Loading code params -
Misiur - 20.01.2017
Looks like you don't have tag in your .ini file. So, change
pawn Код:
INI_ParseFile(code, "VIPCode_%s");
//to
INI_ParseFile(code, "VIPCode");
//and
public VIPCode_data(inputtext, name[], value[])
//to
public VIPCode(inputtext, name[], value[])
OR add a tag to your ini, so it looks like
pawn Код:
[data]
Code = 658n61OHUo
Level = 1
Owner = DeadMasterBG
Buyer = DeadMasterBG