SA-MP Forums Archive
Couple of errors. - 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: Couple of errors. (/showthread.php?tid=292439)



Couple of errors. - manchestera - 23.10.2011

All ive got is a couple or errors but i dont understand what they are so if someone could fix them or tell me how to that would be great thanks.

Код:
C:\Users\GTA ONLY\Desktop\The_Eclipse_V4.8\gamemodes\TE.pwn(2407) : warning 209: function "Streamer_OnPlayerEnterCP" should return a value
C:\Users\GTA ONLY\Desktop\The_Eclipse_V4.8\gamemodes\TE.pwn(2408) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Код:
if ( IsPlayerInDynamicCP( playerid, Challange1) )//2382 line
			{
		if ( IsPlayerInDynamicCP( playerid, Challange1) )
	  	{
	  	    new Moneys  = 1000 + random( 7000 ),
	  	        Score   = 30   + random( 10   ),
	  	        Cookies = 10   + random( 20   ),
	  	        String[ 256 ];

	  		foreach(Player, i)
			{
	  			if ( i != playerid )
		    	{
	      			FormMessage( i, -1, ""COL_OGREEN"%s{FFFFFF} has finished The Big Jump 1 Challange, and won a prize!", PlayerName2( playerid ) );
				}
			}
			format( String, sizeof String, " ~g~ FINISHED~n~~n~~w~You finished the Big Jump Challange!~n~~n~~g~ REWARD!~n~~W~Cash:~g~~h~$%d~n~~w~Score: ~g~~h~%d~n~~w~Cookies: ~g~~h~%d",Moneys, Score, Cookies );
			Info( playerid, String,12000);
			SetPlayerScore( playerid, GetPlayerScore( playerid ) + Score );
			GivePlayerMoney( playerid, Moneys );
	  		{
				DestroyDynamicCP( Challange1);
 }
 }
 }
 }//2407 line
				return 1;//2408 line
}



Re: Couple of errors. - =WoR=Varth - 23.10.2011

pawn Код:
}//2407 line . Remove this bracket



Re: Couple of errors. - Rks25 - 23.10.2011

pawn Код:
if ( IsPlayerInDynamicCP( playerid, Challange1) )//2382 line
{
    if ( IsPlayerInDynamicCP( playerid, Challange1) )
    {
        new Moneys  = 1000 + random( 7000 ),
        Score   = 30   + random( 10   ),
        Cookies = 10   + random( 20   ),
        String[ 256 ];

        foreach(Player, i)
        {
            if ( i != playerid )
            {
                FormMessage( i, -1, ""COL_OGREEN"%s{FFFFFF} has finished The Big Jump 1 Challange, and won a prize!", PlayerName2( playerid ) );
            }
        }
        format( String, sizeof String, " ~g~ FINISHED~n~~n~~w~You finished the Big Jump Challange!~n~~n~~g~ REWARD!~n~~W~Cash:~g~~h~$%d~n~~w~Score: ~g~~h~%d~n~~w~Cookies: ~g~~h~%d",Moneys, Score, Cookies );
        Info( playerid, String,12000);
        SetPlayerScore( playerid, GetPlayerScore( playerid ) + Score );
        GivePlayerMoney( playerid, Moneys );
        {
            DestroyDynamicCP( Challange1);
        }
    }
    return 1;//2408 line
}



Re: Couple of errors. - manchestera - 23.10.2011

Thanks now reading it i see that now.reped