Can someone help me fix this script? :)
#1

Hi, Can someone help me with this script, when compiling I get these warnings and errors:

(54) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)")
(151) : error 020: invalid symbol name ""
(174) : error 010: invalid function or declaration
(175) : error 017: undefined symbol "pInfo"
(175) : error 009: invalid array size (negative, zero or out of bounds)
(179) : error 017: undefined symbol "pPass"
(180) : error 017: undefined symbol "pLevel"
(181) : error 017: undefined symbol "pCash"
(182) : error 017: undefined symbol "pAdmin"
(183) : error 017: undefined symbol "pAge"
(184) : error 017: undefined symbol "pOrigin"
(185) : error 017: undefined symbol "pSex"
(186) : error 017: undefined symbol "pModel"
(187) : error 017: undefined symbol "pDriveLic"
(188 ) : error 017: undefined symbol "pPlace"
(189) : error 017: undefined symbol "pExp"
(190) : error 017: undefined symbol "pAdmin"
(191) : error 017: undefined symbol "pNumber"
(192) : error 017: undefined symbol "pTester"
(193) : error 017: undefined symbol "pWarns"
(194) : error 017: undefined symbol "pSelected"
(195) : error 017: undefined symbol "pMuted"
(196) : error 017: undefined symbol "pMuteTime"
(197) : error 017: undefined symbol "pFirstJoined"
(198 ) : error 017: undefined symbol "pVip"
(199) : error 017: undefined symbol "pSpawn"
(200) : error 017: undefined symbol "pLocked"

(Line 54) - #define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
(Line 151) - #define DIALOG_NAMECHANGE 261
(Line 174) - };
This is whats before the line 174:
enum pInfo
{
pPass,
pLevel,
pSex,
pAge,
pOrigin,
pPlace,
pCash,
pExp,
pAdmin,
pNumber,
pTester,
pWarns,
pSelected,
pMuted,
pMuteTime,
pFirstJoined,
pModel,
pVip,
pSpawn,
pLocked,
pDriveLic,
(Line 175) - new PlayerInfo[MAX_PLAYERS][pInfo];
(Line179) - INI_Int("Password",PlayerInfo[playerid][pPass]);
(Line180) - INI_Int("Level",PlayerInfo[playerid][pLevel]);
(Line181) - INI_Int("Cash",PlayerInfo[playerid][pCash]);
(Line182) - INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
(Line183) - INI_Int("Age",PlayerInfo[playerid][pAge]);
(Line184) - INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
(Line185) - INI_Int("Sex",PlayerInfo[playerid][pSex]);
(Line186) - INI_Int("Model",PlayerInfo[playerid][pModel]);
(Line187) - INI_Int("DriveLic",PlayerInfo[playerid][pDriveLic]);
(Line188 ) - INI_Int("Place",PlayerInfo[playerid][pPlace]);
(Line189) - INI_Int("Exp",PlayerInfo[playerid][pExp]);
(Line190) - INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
(Line191) - INI_Int("Number",PlayerInfo[playerid][pNumber]);
(Line192) - INI_Int("Tester",PlayerInfo[playerid][pTester]);
(Line193) - INI_Int("Warns",PlayerInfo[playerid][pWarns]);
(Line194) - INI_Int("Selected",PlayerInfo[playerid][pSelected]);
(Line195) - INI_Int("Muted",PlayerInfo[playerid][pMuted]);
(Line196) - INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
(Line197) - INI_Int("FirstJoined",PlayerInfo[playerid][pFirstJoined]);
(Line198 ) - INI_Int("Vip",PlayerInfo[playerid][pVip]);
(Line199) - INI_Int("Spawn",PlayerInfo[playerid][pSpawn]);
(Line200) - INI_Int("Locked",PlayerInfo[playerid][pLocked]);

Sorry about all the code, Im new to scripting its all probably just basic and easy..
Reply
#2

I think you've forgot a bracket on the end of the enum
pawn Код:
enum pInfo
{
pPass,
pLevel,
pSex,
pAge,
pOrigin,
pPlace,
pCash,
pExp,
pAdmin,
pNumber,
pTester,
pWarns,
pSelected,
pMuted,
pMuteTime,
pFirstJoined,
pModel,
pVip,
pSpawn,
pLocked,
pDriveLic
};

new PlayerInfo[MAX_PLAYERS][pInfo];
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Level",PlayerInfo[playerid][pLevel]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Age",PlayerInfo[playerid][pAge]);
INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
INI_Int("Sex",PlayerInfo[playerid][pSex]);
INI_Int("Model",PlayerInfo[playerid][pModel]);
INI_Int("DriveLic",PlayerInfo[playerid][pDriveLic]);
INI_Int("Place",PlayerInfo[playerid][pPlace]);
INI_Int("Exp",PlayerInfo[playerid][pExp]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Number",PlayerInfo[playerid][pNumber]);
INI_Int("Tester",PlayerInfo[playerid][pTester]);
INI_Int("Warns",PlayerInfo[playerid][pWarns]);
INI_Int("Selected",PlayerInfo[playerid][pSelected]);
INI_Int("Muted",PlayerInfo[playerid][pMuted]);
INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
INI_Int("FirstJoined",PlayerInfo[playerid][pFirstJoined]);
INI_Int("Vip",PlayerInfo[playerid][pVip]);
INI_Int("Spawn",PlayerInfo[playerid][pSpawn]);
INI_Int("Locked",PlayerInfo[playerid][pLocked]);
Reply
#3

ehm.. and i think that.. test it
Reply
#4

Nope, The bracket at the end of enum is there. :/
Reply
#5

Quote:
Originally Posted by ryansheilds
Посмотреть сообщение
Nope, The bracket at the end of enum is there. :/
You've also put ',' after the last var of this enum - pDriveLic,which caused the error:
What you did:
pawn Код:
enum pInfo
{
pPass,
...
pSpawn,
pLocked,
pDriveLic,
};
Correct:
pawn Код:
enum pInfo
{
pPass,
...
pSpawn,
pLocked,
pDriveLic // you dont need ',' in the last line of the enum
};
Got it?
Reply
#6

I've already tried removing it, Its the first thing I did to try get it working, it makes no difference I still have the same problems..
Reply
#7

pawn Код:
enum pInfo
{
pPass,
pLevel,
pSex,
pAge,
pOrigin,
pPlace,
pCash,
pExp,
pAdmin,
pNumber,
pTester,
pWarns,
pSelected,
pMuted,
pMuteTime,
pFirstJoined,
pModel,
pVip,
pSpawn,
pLocked,
pDriveLic,
}
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Password",PlayerInfo[playerid][pPass]);
INI_Int("Level",PlayerInfo[playerid][pLevel]);
INI_Int("Cash",PlayerInfo[playerid][pCash]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Age",PlayerInfo[playerid][pAge]);
INI_Int("Origin",PlayerInfo[playerid][pOrigin]);
INI_Int("Sex",PlayerInfo[playerid][pSex]);
INI_Int("Model",PlayerInfo[playerid][pModel]);
INI_Int("DriveLic",PlayerInfo[playerid][pDriveLic]);
INI_Int("Place",PlayerInfo[playerid][pPlace]);
INI_Int("Exp",PlayerInfo[playerid][pExp]);
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
INI_Int("Number",PlayerInfo[playerid][pNumber]);
INI_Int("Tester",PlayerInfo[playerid][pTester]);
INI_Int("Warns",PlayerInfo[playerid][pWarns]);
INI_Int("Selected",PlayerInfo[playerid][pSelected]);
INI_Int("Muted",PlayerInfo[playerid][pMuted]);
INI_Int("MuteTime",PlayerInfo[playerid][pMuteTime]);
INI_Int("FirstJoined",PlayerInfo[playerid][pFirstJoined]);
INI_Int("Vip",PlayerInfo[playerid][pVip]);
INI_Int("Spawn",PlayerInfo[playerid][pSpawn]);
INI_Int("Locked",PlayerInfo[playerid][pLocked]);
return 1;
}
Reply
#8

Still the same problem, Thanks for the help though.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)