SA-MP Forums Archive
Errors with public Welcome Message - 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: Errors with public Welcome Message (/showthread.php?tid=453436)



Errors with public Welcome Message - Nahin - 24.07.2013

Any help would be appreciated.

Code :
Код:
forward WelcomeMessage(playerid,flag);
public WelcomeMessage(playerid,flag)
{
    if(IsPlayerNPC(playerid)) return 1;
	if(IsPlayerConnected(playerid))
	{
	    switch(flag)
		{
	        case 0:
			{
			   // new vers[MAX_STRING];
			    //format(vers,sizeof(vers),"..:: Welcome to London RP Server v%s",VERSION);
			   // GameTextForPlayer(playerid,"~w~Welcome on ~n~~r~London RPG Server",5000,1);
			    //SendClientMessage(playerid, COLOR_YELLOW,vers);
			    

				for(new w = 0; w < 20; w++) SendClientMessage(playerid,COLOR_WHITE,"");

		        //SetPlayerCameraPos(playerid,2033.7104,1087.2079,65.6714);
		        //SetPlayerPos(playerid,2030.7104,1080.2079,60.6714);
		        //SetPlayerCameraLookAt(playerid,2128.2332,1234.0111,60.3681);
		        //PlayerPlaySound(playerid,1097,X,Y,Z);
				switch(random(2))
				{
				    case 0:
				    {
						SetPlayerCameraPos(playerid,967.4384,2559.5483,10.7003);
						SetPlayerCameraLookAt(playerid,982.4874,2561.6409,22.5239);
						SetPlayerPos(playerid,967.4384,2559.5483,5.7003);
					}
					case 1:
					{
  						SetPlayerCameraPos(playerid,2058.8811,971.7955,54.5982);
						SetPlayerCameraLookAt(playerid,2057.1230,1189.4883,39.5329);
						SetPlayerPos(playerid,2058.8811,971.7955,47.5982);
					}
					case 2:
					{
					    SetPlayerCameraPos(playerid,2372.1680,2141.8135,31.8135);
					    SetPlayerCameraLookAt(playerid,2299.5005,2142.6213,28.8228);
					    SetPlayerPos(playerid,2372.1680,2141.8135,27.8135);
					}
				}


        		SetPlayerVirtualWorld(playerid,playerid+1);
        		TextDrawShowForPlayer(playerid,Black0);
        		TextDrawShowForPlayer(playerid,Black1);
        //	TextDrawShowForPlayer(playerid,blackTD);
        		TextDrawShowForPlayer(playerid,cttext);
        		TextDrawShowForPlayer(playerid,rptext);
        		TextDrawShowForPlayer(playerid,vertext);
        	


				//SetTimerEx("RemoveText",20000,0,"ii",playerid,_:WText);
			 GameTextForPlayer(playerid,"~w~Welcome on ~n~~r~London Roleplay Server",5000,1);
			    SendClientMessage(playerid, COLOR_YELLOW,"..:: Welcome to London RPG Server V1");
				SendClientMessage(playerid, COLOR_RED,   "..:: Founder Johny Bruno");
				SendClientMessage(playerid, COLOR_RED,   "..:: Owner Leo");
				if (udb_Exists(PlayerName(playerid)))
				{
					ShowPlayerLoginDialog(playerid);
					SetTimerEx("LoginTimer",60000,0,"i",playerid);
				}
				else
					ShowPlayerRegisterDialog(playerid);
			}
			case 1:
			{
			    TextDrawShowForPlayer(playerid, Logo);
			}
		}
	}
	return 1;
}
Error :

Код:
E:\GoGirl\IM Scripts\SM-RPG\gamemodes\beta.pwn(6472) : error 025: function heading differs from prototype
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6517) : error 017: undefined symbol "Black0"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6518) : error 017: undefined symbol "Black1"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6520) : error 017: undefined symbol "cttext"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6521) : error 017: undefined symbol "rptext"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6522) : error 017: undefined symbol "vertext"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6530) : error 017: undefined symbol "ShowPlayerLoginDialog"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6534) : error 017: undefined symbol "ShowPlayerRegisterDialog"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6538) : error 017: undefined symbol "Logo"
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6542) : warning 225: unreachable code
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6542) : error 036: empty statement
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


10 Errors.



Re: Errors with public Welcome Message - RALL0 - 25.07.2013

You need to define the textdraws like - new Text:Black0;
Just a question for you did you code this? For the dialogs if there aren't any functions check if there is defined login dialog or something similar like that. They you can do
pawn Код:
ShowPlayerDialog(playerid, /*DEFINED_DIALOG*/, /*DIALOG_STYLE*/,"TYPE PASSWORD BLA BLA..","Ok","Cancel");



Re: Errors with public Welcome Message - Nahin - 25.07.2013

Can someone elaborate more please?


Re: Errors with public Welcome Message - Nahin - 25.07.2013

Anyone? I need this real bad.


Re: Errors with public Welcome Message - Nahin - 25.07.2013

Well after doing what you said, I have narrowed down to two errors.

Код:
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6544) : error 004: function "ShowPlayerLoginDialog" is not implemented
E:\GoGirl\Scripts\SM-RPG\gamemodes\beta.pwn(6548) : error 004: function "ShowPlayerRegisterDialog" is not implemented
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Errors with public Welcome Message - Nahin - 26.07.2013

?