Bank system
#1

Hi I am making a bank system and I got these errors..

pawn Код:
enum Money
{
{5},
{10},
{15},
{20},
}

new pMoney[Money];
Error('s);

Код:
C:\Users\BooNii3\Los Santos Role Play Forums - Server\Los Santos Role Play - Server\gamemodes\Test1.pwn(24) : error 001: expected token: "-identifier-", but found "{"
Reply
#2

Remove the {} in the enum as its not an array.
Reply
#3

Get this error now :/,
Код:
C:\Users\BooNii3\Los Santos Role Play Forums - Server\Los Santos Role Play - Server\gamemodes\Test1.pwn(24) : error 001: expected token: "-identifier-", but found "-integer value-"
Reply
#4

And more like this:

enum Money
{
Money1,
Money2,
}
Reply
#5

enum Money
{
Money1,
Money2,
Money3 // at the last one dont do a comma, else the compiler will think theres another money coming and gives error.
}
Reply
#6

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
enum Money
{
Money1,
Money2,
Money3 // at the last one dont do a comma, else the compiler will think theres another money coming and gives error.
}
Not really ur mixing Enums and Symbols.
Reply
#7

anyway its really a good idea
Reply
#8

Код:
enum Money
{
Money1,
Money2,
Money3,
};
that should work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)