SA-MP Forums Archive
Help with "PlayerToPoint" - 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: Help with "PlayerToPoint" (/showthread.php?tid=285375)



Help with "PlayerToPoint" - ServerScripter - 23.09.2011

PHP код:
if(strcmp(cmd"/atmwithdraw"true) == || strcmp(cmd"/ratm"true) == 0)
        {
            if(
IsPlayerConnected(playerid))
            {
    ((
Line 36691))             if(!PlayerToPoint(3playerid, -32.276363,-57.995586,1003.139953) && !PlayerToPoint(3playerid374.718902,167.128982,1007.987304)) && !PlayerToPoint(3playerid1813.2092,-1905.2410,13.5690))//The Line 36691[/COLOR]
                
{
                    
SendClientMessage(playeridCOLOR_GREY"Vous n'кtes pas a cotй d'un ATM!");
                    return 
1;
                }
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /retireratm [montant]");
                    
format(stringsizeof(string), "Vous avez $%d sur votre compte bancaire."PlayerInfo[playerid][pAccount]);
                    
SendClientMessage(playeridCOLOR_GRAD3string);
                    return 
1;
                }
                new 
cashdeposit strval(tmp);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /retireratm [montant]");
                    
format(stringsizeof(string), "  Vous avez $%d sur votre compte bancaire."PlayerInfo[playerid][pAccount]);
                    
SendClientMessage(playeridCOLOR_GRAD3string);
                    return 
1;
                }
                if (
cashdeposit PlayerInfo[playerid][pAccount] || cashdeposit 1)
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"Vous n'avez pas cette somme sur votre compte bancaire!");
                    return 
1;
                } 
Errors:
Код:
C:\DOCUME~1\PC\Bureau\SAMP03~1\GAMEMO~1\u2c-rp.pwn(36691) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PC\Bureau\SAMP03~1\GAMEMO~1\u2c-rp.pwn(36691) : error 001: expected token: ";", but found ")"
C:\DOCUME~1\PC\Bureau\SAMP03~1\GAMEMO~1\u2c-rp.pwn(36691) : error 029: invalid expression, assumed zero
C:\DOCUME~1\PC\Bureau\SAMP03~1\GAMEMO~1\u2c-rp.pwn(36691) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
As you can see , there are three "PlayerToPoint" , so , before, it was two "PlayerToPoint" and perfect working without Errors/Warns , and i added a new Position to withdraw Money (the third "PlayerToPoint") but i get 4 Errors
Note : The line 36691 is the Red one .


Re: Help with "PlayerToPoint" - Jafet_Macario - 23.09.2011

PHP код:
if(!PlayerToPoint(3playerid, -32.276363,-57.995586,1003.139953) && !PlayerToPoint(3playerid374.718902,167.128982,1007.987304) && !PlayerToPoint(3playerid1813.2092,-1905.2410,13.5690)) 



Re: Help with "PlayerToPoint" - ServerScripter - 23.09.2011

Perfect Working ! what you have changed to make it working ? oO


Re: Help with "PlayerToPoint" - Jafet_Macario - 23.09.2011

Check the bracket from the 2nd PlayerToPoint:
pawn Код:
if(!PlayerToPoint(3, playerid, -32.276363,-57.995586,1003.139953) && !PlayerToPoint(3, playerid, 374.718902,167.128982,1007.987304)) && !PlayerToPoint(3, playerid, 1813.2092,-1905.2410,13.5690))  // Yours
if(!PlayerToPoint(3, playerid, -32.276363,-57.995586,1003.139953) && !PlayerToPoint(3, playerid, 374.718902,167.128982,1007.987304) && !PlayerToPoint(3, playerid, 1813.2092,-1905.2410,13.5690))   // Mine



Re: Help with "PlayerToPoint" - ServerScripter - 23.09.2011

Oh i see thanks for your Help


Re: Help with "PlayerToPoint" - Vince - 23.09.2011

Just to add something that came into my mind: 'Gosh, why are people still using outdated functions when there are far better alternatives available'.