PDA

View Full Version : Compiling Errors .


houssam501
12/10/2014, 02:43 PM
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(124) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(124) : warning 215: expression has no effect
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(124) : error 001: expected token: ";", but found "-string-"
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(124) : warning 215: expression has no effect
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(124) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(124) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Can anyone help me to fix this problem ? :)

AdHaM612
12/10/2014, 02:49 PM
Show us line number 124.

houssam501
12/10/2014, 03:01 PM
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COLOR_RED"Login",""COLOR_RED"Type your password below to login.","Login","Quit");

AdHaM612
12/10/2014, 03:17 PM
You can just use this
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FF0000}Login","{FF0000}Type your password below to login.","Login","Quit");
{FF0000} is red, so it doesn't matter if you changed your code to this, but the errors will disappear.

houssam501
12/10/2014, 03:28 PM
Still same errors ...

Thanos1997
12/10/2014, 03:59 PM
show us the line 123, 124 and 125

houssam501
12/10/2014, 06:47 PM
Ok, i will tomorrow i'm v busy today

HY
12/10/2014, 07:02 PM
// At the top of script :

#define DIALOG_LOGIN (Dialog_ID)

Your dialog :

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,"{FF0000}Login","{FF0000}Type your password below to login.","Login","Quit");

houssam501
13/10/2014, 02:30 PM
when compiling i get the same errors is line 143
Full Code :
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat" You must register to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new str[256],IP[16],buf[129];
GetPlayerIp(playerid, IP, sizeof(IP));
if(!strlen(inputtext))
{
format(str,sizeof(str),""chat"Welcome %s to "NAME"",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,str,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
}

new INI:File = INI_Open(UserPath(playerid));
WP_Hash(buf, sizeof(buf), inputtext);
INI_SetTag(File,"data");
INI_WriteString(File, "pPassword", buf);
INI_WriteInt(File,"pScore",0);
INI_WriteInt(File,"pMoney",0);
INI_WriteInt(File,"pKills",0);
INI_WriteInt(File,"pDeaths",0);
INI_WriteInt(File,"pRank",0);
INI_WriteInt(File,"pEvac",0);
INI_WriteInt(File,"pAdminLevel",0);
INI_WriteInt(File,"pAdminDuty",0);
INI_WriteInt(File,"pVipLevel",0);
INI_WriteInt(File,"pHour",0);
INI_WriteInt(File,"pMin",0);
INI_WriteInt(File,"pSec",0);
INI_WriteInt(File,"pMapsPlayed",0);
INI_WriteInt(File,"pCoins",0);
INI_WriteString(File,"pIP",IP);
INI_WriteInt(File,"pBanned",0);
INI_WriteInt(File,"gLeader",0);
INI_WriteInt(File,"gMember",0);
INI_Close(File);

playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
pInfo[playerid][pLogged] = 1;
}
}

case DIALOG_LOGIN:
{
if(!response)
{
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat" You must login to play at "NAME"","Close","");
Kick(playerid);
}
if(response)
{
new buf[129];
WP_Hash(buf, sizeof(buf), inputtext);
if(!strcmp(buf,pInfo[playerid][pPassword]))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
pInfo[playerid][pLogged] = 1;
playedtimer[playerid] = SetTimerEx("TimeOnServer", 1000, 1, "i", playerid);
SendClientMessage(playerid,-1,""chat""COL_LGREEN" Logged in!");
printf("%s",pInfo[playerid][pPassword]);
}
else
{
new string[256];
format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
}
return 1;
}
}

houssam501
13/10/2014, 02:33 PM
Line 143 ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_S TYLE_MSGBOX,"Kicked",""chat" You must register to play at "NAME"","Close","");

houssam501
13/10/2014, 02:56 PM
I Fixes this alone but i get another problem at line 151
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(151) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(151) : error 017: undefined symbol "chat"
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(151) : warning 215: expression has no effect
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(151) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Administrateur\Bureau\avst.pwn(151) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.


Line : format(str,sizeof(str),""chat"Welcome %s to "NAME"",PlayerName(playerid));

Malicious
13/10/2014, 03:16 PM
Right... I have no idea what you think you're doing really..
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_TYPE_PASSWORD, "Caption[]", "[text]", "login","leave");

Stop adding so many of these " and only add them where necessary, that's why you're having issues mate.

format(str,sizeof(str),""chat"Welcome %s to "NAME"",PlayerName(playerid));

Again, as stated before, use the color codes instead of the defined names, "{FFFFFF}" .

format(str, sizeof(str), "{FFFF80}[ Welcome ]{FFFFFF} Hello %s, welcome to my server!", PlayerName(playerid));
SendClientMessage(playerid, CHAT, str);