New table in the database. -
GuitarMan - 03.09.2015
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.
Re: New table in the database. -
bgedition - 03.09.2015
Hey there,
The enum's name is exactly the same as the variable belowm
Re: New table in the database. -
GuitarMan - 03.09.2015
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.
Re: New table in the database. -
ball - 03.09.2015
Try to change enum name, for example to e_ranking.
Re: New table in the database. -
bgedition - 03.09.2015
Sorry I went wrong take a look at this and try it
https://sampforum.blast.hk/showthread.php?tid=357873
Re: New table in the database. -
GuitarMan - 03.09.2015
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.
Re: New table in the database. -
bgedition - 03.09.2015
Where you put this enum? It should be closer to the top and under the defines.
Re: New table in the database. -
GuitarMan - 03.09.2015
It is right beside all the other enums. Location should be ok.
Re: New table in the database. -
bgedition - 03.09.2015
#May be(I am not really sure). Generally after the enum's brackets there is no semicolon symbol.
Re: New table in the database. -
GuitarMan - 03.09.2015
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,
bool Status,
Text3D Text3D
};
new ProductInfo[MAX_PRODUCT][pinfo];
|