invalid function or declaration
#1

Im get only one error at this registry system "invalid function or declaration" why it happens?Thanks

{
if(strcmp(cmd,"/xlogin",true) == 0) {

if (dini_Exists(PF)) {
if (!strlen(cmdtext)) { SendClientMessage(playerid,red,"Syntax: /XLOGIN <PASSWORD>"); return 1; }
if(Registered[playerid] == 1 && LoggedIn[playerid] == 0) {
if(dini_Int(PF,"password") == udb_hash(cmdtext)) {
if (dini_Int(PF,"level")==0) { SendClientMessage(playerid,green,"You have logged in as a member."); dini_IntSet(PF,"loggedin",1); LoggedIn[playerid] = 1; }
else { format(xstring,sizeof(xstring),"You have logged in as an administrator. [Level %d]",dini_Int(PF,"level")); SendClientMessage(playerid,green,xstring); dini_IntSet(PF,"loggedin",1); LoggedIn[playerid] = 1; }
}
else {
LogTry[playerid] -= 1; new tries = LogTry[playerid];
if (tries > 0) { format(xstring,sizeof(xstring),"Incorrect Password: You have %d try(s) remaining.",tries); SendClientMessage(playerid,red,xstring); }
else { format(xstring,sizeof(xstring),"%s has been kicked from the game. (Reason: Login Failure)",name); SendClientMessageToAll(yellow,xstring); dini_IntSet(PF,"logintry",3); Kick(playerid); }
}
} else SendClientMessage(playerid,red,"Error: Please make sure that you have registered and logged out first. You might already be logged in.");
} else SendClientMessage(playerid,red,"Error: You must create a server account first. To register, type '/XREGISTER <PASSWORD>.");
return 1;
}
if(strcmp(cmd,"/xlogout",true)==0) {
if(Registered[playerid] == 1 && LoggedIn[playerid] == 1) {
SendClientMessage(playerid,yellow,"You have logged out of your server account.");
dini_IntSet(PF,"loggedin",0); dini_IntSet(PF,"cash",0); LoggedIn[playerid] = 0;
} else SendClientMessage(playerid,red,"Error: You have to be registered and logged into the server first.");
return 1;
}
if(strcmp(cmd,"/xregister",true) == 0) {

if (!strlen(cmdtext)) { SendClientMessage(playerid,red,"Syntax: /XREGISTER <PASSWORD>"); return 1; }
if (Registered[playerid] == 0) {
if ((strlen(cmdtext) >= 5) && (strlen(cmdtext) <= 20)) {
if (LoggedIn[playerid] == 0) {
dini_IntSet(PF,"registered",1); dini_IntSet(PF,"loggedin",0); dini_IntSet(PF,"passworded",1); dini_IntSet(PF,"password",udb_hash(cmdtext)); Registered[playerid] = 1; LoggedIn[playerid] = 1; dini_IntSet(PF,"loggedin",1);
format(xstring,sizeof(xstring),"You have successfully registered User %s. You have automatically been logged in.",name); SendClientMessage(playerid,yellow,xstring);
} else SendClientMessage(playerid,red,"Error: This account has already been created. To login, type '/XLOGIN <PASSWORD>.");
} else SendClientMessage(playerid,red,"Error: The password you have entered is too short or too long. (Min: 5, Max: 20)");
} else SendClientMessage(playerid,red,"Error: This account has already been created. To login, type '/XLOGIN <PASSWORD>.");
return 1;
}
Reply
#2

Post your error line.
Reply
#3

What is wrong here?
Reply
#4

C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(102) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(104) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(105) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(106) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(107) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(10 : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(109) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(111) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(113) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(114) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(116) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(117) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(11 : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(120) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(121) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(123) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(123) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(124) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(125) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(127) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(129) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(130) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(131) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(132) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(133) : error 010: invalid function or declaration
C:\Users\hpi\Desktop\samp03asvr_R4_win32\gamemodes \Learning.pwn(133) : error 010: invalid function or declaration

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#5

Why i got this error?
Reply
#6

O.O You should really increase the readibility of your code, it makes it so much easier to comb through later on and fix errors such as the ones your getting.
After organizing it, make sure all your braces ( "{" & "}" ) are in order. After skimming through it briefly that seems like it might be the problem, there are several instances where I am sure that is the problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)