SA-MP Forums Archive
5 error's please help! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 5 error's please help! (/showthread.php?tid=332779)



5 error's please help! - Derek Westbrook - 09.04.2012

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, WHITE, "Welcome to Real Europian RolePlay");
SendClientMessageToAll(WHITE, "A player joined the server!");
Login[playerid] = 0;
new nombre[MAX_PLAYER_NAME], archivo[256];
GetPlayerName(playerid, nombre, sizeof(nombre));
format(archivo, sizeof(archivo), "/Users/%s.ini", nombre);
if (!dini_Exists(archivo))
{
ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Please enter a password:", "Okay", "Back");
}
else
{
ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Enter your password", "Login", "Back");
}
return 1;
}

{
PosX[ playerid ] = 0;
PosY[ playerid ] = 0;
PosZ[ playerid ] = 0;
Angle[ playerid ] = 0;
Interior[ playerid ] = 0;
VirtualWorld[ playerid ] = 0;

INI_ParseFile(user_ini_file(playerid), "load_user_%s", .bExtra = true, .extra = playerid);
return 1;
}

Errors :

\RERP.pwn(10 : error 055: start of function body without function header
\RERP.pwn(116) : error 025: function heading differs from prototype
\RERP.pwn(116) : error 021: symbol already defined: "INI_ParseFile"
\RERP.pwn(116) : error 010: invalid function or declaration
\RERP.pwn(116) : fatal error 107: too many error messages on one line


Re: 5 error's please help! - Derek Westbrook - 09.04.2012

the smily ( 8 ) in the firsth error is a Eight , somehow its a smily :\!


Re: 5 error's please help! - Ash. - 09.04.2012

Could you post the code in [pawn][/pawn] tags to make the code more human-readable. Could you also show which lines are which. That will enable us to help you better.


Re: 5 error's please help! - Cjgogo - 09.04.2012

pawn Код:
public OnPlayerConnect(playerid)
{
   SendClientMessage(playerid, WHITE, "Welcome to Real Europian RolePlay");
   SendClientMessageToAll(WHITE, "A player joined the server!");
   Login[playerid] = 0;
   new nombre[MAX_PLAYER_NAME], archivo[256];
   GetPlayerName(playerid, nombre, sizeof(nombre));
   format(archivo, sizeof(archivo), "/Users/%s.ini", nombre);
   if (!dini_Exists(archivo))
   {
       ShowPlayerDialog(playerid, Register, DIALOG_STYLE_INPUT, "Register", "Please enter a password:", "Okay", "Back");
   }
   else
   {
      ShowPlayerDialog(playerid, Logged, DIALOG_STYLE_INPUT, "Login", "Enter your password", "Login", "Back");
   }
   PosX[ playerid ] = 0;
   PosY[ playerid ] = 0;
   PosZ[ playerid ] = 0;
   Angle[ playerid ] = 0;
   Interior[ playerid ] = 0;
   VirtualWorld[ playerid ] = 0;
   INI_ParseFile(user_ini_file(playerid), "load_user_%s", .bExtra = true, .extra = playerid);
return 1;
}
Replace the whole code with what I gave you.