Click here to save the world(1 minute till launch)
#1

*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.
Reply
#2

Example:

Код:
enum data
{
	var1[25],
	var2[25]
};

new var[ < integer > ][data];
Reply
#3

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]
Reply
#4

Try to swap [BizInfo] and [Pickups]

"Pickups" is the max. amount of biz' ?!?
Reply
#5

But there are also other non string variables, should they be different enums?
Reply
#6

I don't think this is necessary...
Reply
#7

I think it is, because it would be very inefficient to have 25 x every variable.
Reply
#8

I don't get it xD

Just post the BizInfo enum
Reply
#9

enum BizInfo {
Name[25],
Owner[25],
Prices,
ComPrice,
Cash
}
Reply
#10

And now add

new BizData[max. amount of biz'][BizInfo];

and done
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)