SA-MP Forums Archive
OnPlayerConnect Problem ??? - 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: OnPlayerConnect Problem ??? (/showthread.php?tid=389868)



OnPlayerConnect Problem ??? - AwokenNeoX - 03.11.2012

Heay I have a porblem with this { and } there is a mistake


Error:

Код:
C:\Users\Kerem\Desktop\UltimateFreeStyl\gamemodes\Reallife.pwn(73) : warning 225: unreachable code
C:\Users\Kerem\Desktop\UltimateFreeStyl\gamemodes\Reallife.pwn(79) : error 001: expected token: ";", but found "}"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
public OnPlayerConnect(playerid)
{
	ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registrieren","Bitte gib das gewьnschte Password 
        ein.","Register","Abbrechen");
	return 1;
	
    {
	new name[256],string[256];
	GetPlayerName(playerid,name,sizeof(name));
	format(string,sizeof(string),"%s, Willkomen bei Black Revoltion Roleplay",name);
	SendClientMessage(playerid,GELB,string);
	return 1
    }
}
What is the Problem


AW: OnPlayerConnect Problem ??? - Skimmer - 03.11.2012

OnPlayerConnect() should return a value

pawn Код:
return 1;
pawn Код:
public OnPlayerConnect(playerid)
{
    ShowPlayerDialog(playerid,2,DIALOG_STYLE_INPUT,"Registrieren","Bitte gib das gewьnschte Password ein.","Register","Abbrechen");
    new name[256],string[256];
    GetPlayerName(playerid,name,sizeof(name));
    format(string,sizeof(string),"%s, Willkomen bei Black Revoltion Roleplay",name);
    SendClientMessage(playerid,GELB,string);
    return 1;
}



Re: OnPlayerConnect Problem ??? - MrBlake - 03.11.2012

Код:
SendClientMessage(playerid,GELB,string);
	return 1
You have missed a ";" :

Код:
SendClientMessage(playerid,GELB,string);
	return 1;