Help with "PlayerToPoint" -
ServerScripter - 23.09.2011
PHP код:
if(strcmp(cmd, "/atmwithdraw", true) == 0 || strcmp(cmd, "/ratm", true) == 0)
{
if(IsPlayerConnected(playerid))
{
((Line 36691)) 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))//The Line 36691[/COLOR]
{
SendClientMessage(playerid, COLOR_GREY, "Vous n'кtes pas a cotй d'un ATM!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retireratm [montant]");
format(string, sizeof(string), "Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
new cashdeposit = strval(tmp);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /retireratm [montant]");
format(string, sizeof(string), " Vous avez $%d sur votre compte bancaire.", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
return 1;
}
if (cashdeposit > PlayerInfo[playerid][pAccount] || cashdeposit < 1)
{
SendClientMessage(playerid, COLOR_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(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))
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'.