dcmd_register(playerid,params[]) { new file[256],n[MAX_PLAYER_NAME]; GetPlayerName(playerid,n,MAX_PLAYER_NAME); format(file,sizeof(file),"MyAdmin/Users/%s.txt",n); if(dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are already registered!"); if(PInfo[playerid][Regged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already registered!"); if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,ORANGE,"You are already registered, /login"); dini_Create(file); dini_Set(file,"Password",params); dini_IntSet(file,"Regged",1); dini_IntSet(file,"Logged",0); dini_IntSet(file,"Level",0); SendClientMessage(playerid,LIGHTBLUE,"Congratulations, you have just registered, please /login"); PInfo[playerid][Regged] = 1; return 1; } else // error line { SendClientMessage(playerid,GREY,"USAGE: /register <Password>"); } return 1; //error line }
C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(264) : warning 217: loose indentation C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(272) : error 010: invalid function or declaration C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(276) : error 010: invalid function or declaration 2 Errors. |
if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,ORANGE,"You are already registered, /login");
You have a bracket that closes but no fitting bracket that opens.
There is one if-statement missing after pawn Код:
|
dcmd_register(playerid,params[])
{
new file[256],n[MAX_PLAYER_NAME];
GetPlayerName(playerid,n,MAX_PLAYER_NAME);
format(file,sizeof(file),"MyAdmin/Users/%s.txt",n);
if(dini_Exists(file)) return SendClientMessage(playerid,YELLOW,"You are already registered!");
if(PInfo[playerid][Regged] == 1) return SendClientMessage(playerid,LIGHTBLUE,"You are already registered!");
if(PInfo[playerid][Logged] == 1) return SendClientMessage(playerid,ORANGE,"You are already registered, /login");
{
dini_Create(file);
dini_Set(file,"Password",params);
dini_IntSet(file,"Regged",1);
dini_IntSet(file,"Logged",0);
dini_IntSet(file,"Level",0);
SendClientMessage(playerid,LIGHTBLUE,"Congratulations, you have just registered, please /login");
PInfo[playerid][Regged] = 1;
return 1;
}
else SendClientMessage(playerid,GREY,"USAGE: /register <Password>");
return 1;
}
pawn Код:
|
C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(263) : warning 217: loose indentation C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(265) : warning 217: loose indentation C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(273) : warning 225: unreachable code C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(273) : warning 217: loose indentation C:\Users\james\Desktop\server2\filterscripts\fadmi n.pwn(273) : error 029: invalid expression, assumed zero Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
#pragma tabsize 0 for loose indentation unreachable code i dont know :/
|