Click here to save the world(1 minute till launch) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Click here to save the world(1 minute till launch) (
/showthread.php?tid=83538)
Click here to save the world(1 minute till launch) -
zallomallo - 25.06.2009
*Nuke disarmed.
Now, while where here I have a quick question about strings,
pawn Код:
new tempo[7];
for(new i; i < Pickups; i ++) {
format(tempo, 7, "%dName", i);
format(Names[i], 25, "%s", dini_Get("/LSA/Data/BizData.txt", tempo));
format(tempo, 7, "%dOwner", i);
format(BizData[Owner][i], 25, "%s", dini_Get("/LSA/Data/BizData.txt", tempo));
}
Declarations:
pawn Код:
enum BizInfo {
Name[25],
Owner[25]
}
new Names[Pickups][25];
Names works, but the enum doesn't. Any help would be REALLY appreciated.
Re: Click here to save the world(1 minute till launch) -
Rimeau - 25.06.2009
Example:
Код:
enum data
{
var1[25],
var2[25]
};
new var[ < integer > ][data];
Re: Click here to save the world(1 minute till launch) -
zallomallo - 25.06.2009
Quote:
Originally Posted by Rimeau
Example:
Код:
enum data
{
var1[25],
var2[25]
};
new var[ < integer > ][data];
|
If by Interger you mean BizID, then yeah thats basically what I have.
BizData[BizInfo][Pickups]
Re: Click here to save the world(1 minute till launch) -
Rimeau - 25.06.2009
Try to swap [BizInfo] and [Pickups]
"Pickups" is the max. amount of biz' ?!?
Re: Click here to save the world(1 minute till launch) -
zallomallo - 25.06.2009
But there are also other non string variables, should they be different enums?
Re: Click here to save the world(1 minute till launch) -
Rimeau - 25.06.2009
I don't think this is necessary...
Re: Click here to save the world(1 minute till launch) -
zallomallo - 25.06.2009
I think it is, because it would be very inefficient to have 25 x every variable.
Re: Click here to save the world(1 minute till launch) -
Rimeau - 25.06.2009
I don't get it xD
Just post the BizInfo enum
Re: Click here to save the world(1 minute till launch) -
zallomallo - 25.06.2009
enum BizInfo {
Name[25],
Owner[25],
Prices,
ComPrice,
Cash
}
Re: Click here to save the world(1 minute till launch) -
Rimeau - 25.06.2009
And now add
new BizData[max. amount of biz'][BizInfo];
and done