New table in the database.
#1

Hey.
So i was trying to make a new table inside my DB, but as soon as i try to compile my pawno it drops the "Pawno library has stoped working" thingy.

So heres what ive done:

I did make the table inside my MySQL

I defined the new Table where all the other tables were defined inside the gamemode

Код:
#define TABLE_RANKING       "ranking"
I found out that the faulty part is the enum. I took out code fragments one by one and once i take out the enum part, it goes fine.

So heres how the enum looks:
Код:
#define MAX_RANK 5
enum ranking
{
	place,
	name,
	time,
	date
};

new ranking[MAX_RANK][ranking]
Ive no idea how enums work, i imagine them as arrays.
Reply
#2

Hey there,
The enum's name is exactly the same as the variable belowm
Reply
#3

Alright so, i replaced it to:

Quote:

#define MAX_RANK 5
enum RaceRanking
{
place,
name,
time,
date
};

new ranking[MAX_RANK][RaceRanking];

But that does not fix anything. It still goes not responding.
Reply
#4

Try to change enum name, for example to e_ranking.
Reply
#5

Sorry I went wrong take a look at this and try it https://sampforum.blast.hk/showthread.php?tid=357873
Reply
#6

None of that works.
I did change the name of the enum, but the same effect.
Also, if i disable that enum, it compiles just fine.
Reply
#7

Where you put this enum? It should be closer to the top and under the defines.
Reply
#8

It is right beside all the other enums. Location should be ok.
Reply
#9

#May be(I am not really sure). Generally after the enum's brackets there is no semicolon symbol.
Reply
#10

I checked my code. All the other enums has smicolons.
Quote:

enum aInfo
{
id,
aText[128],
aName[MAX_PLAYER_NAME],
aPhone,
};
new AdvertInfo[MAX_ADVERT][2][aInfo];

#define MAX_RANK 5
enum e_RaceRanking
{
place,
name,
time,
date
};

new ranking[MAX_RANK][e_RaceRanking];
#define MAX_PRODUCT 100

enum pinfo
{
id,
pName[MAX_PLAYER_NAME],
pBizzid,
pPrice,
pTill,
boolStatus,
Text3DText3D
};
new ProductInfo[MAX_PRODUCT][pinfo];

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)