Problem with a string.. Saves d in front.. - 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: Problem with a string.. Saves d in front.. (
/showthread.php?tid=577500)
Problem with a string.. Saves d in front.. -
Scrillex - 11.06.2015
Hello dear samp users.. I have a problem with my string saving..
Here it is how it saves..
pawn Код:
BankCardBNr = d22
BankCardPin = d168
Here is the random generation code..
pawn Код:
new CardBNr[4], CardPin[5];
format(CardBNr, sizeof(CardBNr),"d%d%d", random(10), random(10), random(10), random(10));
format(CardPin, sizeof(CardPin),"d%d%d%d", random(10), random(10),random(10), random(10), random(10));
Here is the saving:
pawn Код:
INI_WriteString(File,"BankCardBNr",CardBNr);
INI_WriteString(File,"BankCardPin",CardPin);
With best regards Scrillex!
Re: Problem with a string.. Saves d in front.. -
Scrillex - 11.06.2015
Problem found... Forgot in front to set %!
Re: Problem with a string.. Saves d in front.. -
Prokill911 - 12.06.2015
Quote:
Originally Posted by Scrillex
Hello dear samp users.. I have a problem with my string saving..
pawn Код:
format(CardPin, sizeof(CardPin),"d%d%d%d", random(10), random(10),random(10), random(10), random(10));
!
|
That code is incorrect..
It's
Re: Problem with a string.. Saves d in front.. -
SickAttack - 12.06.2015
Quote:
Originally Posted by Prokill911
That code is incorrect..
It's
|
That's what he said...
You also have 5 arguments and only 4 specifiers.