SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/02/2015, 07:05 AM   #1
Alvin007
Huge Clucker
 
Alvin007's Avatar
 
Join Date: Mar 2011
Location: Tunisia
Posts: 245
Reputation: 9
Default Loading number from ini

I have this, declared on the top.
PHP Code:
new cNum;
INI:ABankNum[NextBNumber](name[], value[])
{
   
INI_Int("CurrentCardNum",cNum);
   return 
0;

And this is used when the player uses a certain command.
So

PHP Code:
INI_Load("ABankNum.ini");
GivePlayerMoney(playerid,-500);
BankInfo[playerid][CardNumber]=cNum// Instead of "1000" in BankInfo[playerid][CardNumber] ( which is loaded from ABankNum.inu) I find the number "0"
new INI:cInfo=INI_Open("ABankNum.ini");
INI_SetTag(cInfo,"NextBNumber");
INI_WriteInt(cInfo,"CurrentCardNum",cNum+1);
INI_Close(cInfo); 
That's what i find in the ABankNum.ini
Quote:
[NextBNumber]
CurrentCardNum = 1000[NextBNumber]
CurrentCardNum = 1
Help?
__________________
Alvin007 is offline   Reply With Quote
Old 17/02/2015, 02:42 PM   #2
Alvin007
Huge Clucker
 
Alvin007's Avatar
 
Join Date: Mar 2011
Location: Tunisia
Posts: 245
Reputation: 9
Default Re : Loading number from ini

BUMP
__________________
Alvin007 is offline   Reply With Quote
Old 21/02/2015, 08:57 PM   #3
Alvin007
Huge Clucker
 
Alvin007's Avatar
 
Join Date: Mar 2011
Location: Tunisia
Posts: 245
Reputation: 9
Default Re : Loading number from ini

BUMP
__________________
Alvin007 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem loading a number using Y_ini Alvin007 Scripting Help 1 09/02/2015 06:52 PM
Loading a number from MYSQL dusk Scripting Help 4 14/02/2013 12:07 PM
SQL lite loading number 48 from nowhere [WSF]ThA_Devil Scripting Help 2 20/04/2012 12:12 PM
doing random number with number range defined henry jiggy Help Archive 3 10/08/2011 11:59 PM
Random number, then pick string out of an array depending on number? Robbin237 Help Archive 2 26/02/2009 07:26 PM


All times are GMT. The time now is 05:01 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.