PlayerToPoint
#1

Код:
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(2689) : warning 209: function "IsAtLicenseplace" should return a value
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 2689:
Код:
public IsAtLicenseplace(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 362.4653, 173.7711, 1008.3828))
	return 1;
}                                                                                                         -> 2689
Line 9978:

Код:
public OnObjectMoved(objectid)
{
    for( new playerid=0; playerid<=MAX_PLAYERS; playerid++)
    {
        if(objectid==platforma)
        {
            if(IsPlayerInRangeOfPoint(playerid,3.0, 1549.0999755859, -1651.9000244141,90.36))
            {
                MoveDynamicObject(usadesus1, 1554.0999755859, -1656.6999755859, 29,4);
                MoveDynamicObject(usadesus2, 1554, -1651.2999755859, 29,4);
                SetTimer("InchideUsaDeSus",3000,0);
            }
            if(PlayerToPoint(playerid,3.0,1549.0999755859, -1651.9000244141,12.36))                      ->9978
            {
                MoveDynamicObject(usadejos1,1549.1999511719, -1651.0, 14.300000190735,4);
                MoveDynamicObject(usadejos2,1549.1999511719, -1656.5, 14.300000190735,4);
                SetTimer("InchideUsaDeJos",3000,0);
            }
        }
    }
    return 1;
}
Reply
#2

Quote:
Originally Posted by DarkWolfff
Посмотреть сообщение
Код:
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(2689) : warning 209: function "IsAtLicenseplace" should return a value
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : warning 215: expression has no effect
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Mihai\Desktop\GM\gamemodes\Godfather.pwn(9978) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 2689:
Код:
public IsAtLicenseplace(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 362.4653, 173.7711, 1008.3828))
	return 1;
}                                                                                                         -> 2689
Line 9978:

Код:
public OnObjectMoved(objectid)
{
    for( new playerid=0; playerid<=MAX_PLAYERS; playerid++)
    {
        if(objectid==platforma)
        {
            if(IsPlayerInRangeOfPoint(playerid,3.0, 1549.0999755859, -1651.9000244141,90.36))
            {
                MoveDynamicObject(usadesus1, 1554.0999755859, -1656.6999755859, 29,4);
                MoveDynamicObject(usadesus2, 1554, -1651.2999755859, 29,4);
                SetTimer("InchideUsaDeSus",3000,0);
            }
            if(PlayerToPoint(playerid,3.0,1549.0999755859, -1651.9000244141,12.36))                      ->9978
            {
                MoveDynamicObject(usadejos1,1549.1999511719, -1651.0, 14.300000190735,4);
                MoveDynamicObject(usadejos2,1549.1999511719, -1656.5, 14.300000190735,4);
                SetTimer("InchideUsaDeJos",3000,0);
            }
        }
    }
    return 1;
}
Код:
public IsAtLicenseplace(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 362.4653, 173.7711, 1008.3828))
	return 1;
}                                                                                                         -> 2689
fix it by doing
pawn Код:
public IsAtLicenseplace(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 362.4653, 173.7711, 1008.3828))
    return 1;
}
and replace your PlayerToPoint to IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wroot/index.ph...nt&redirect=no
Reply
#3

Quote:
Originally Posted by TheFlyer
Посмотреть сообщение
fix it by doing
pawn Код:
public IsAtLicenseplace(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, 10.0, 362.4653, 173.7711, 1008.3828))
    return 1;
}
This won't fix anything. You only changed the indentation, which has no effect at all. To actually fix the problem, either add a return 0 at the end of the function or use a simplification:
pawn Код:
IsAtLicensePlace(playerid)
    return IsPlayerInRangeOfPoint(playerid, 10.0, 362.4653, 173.7711, 1008.3828);
I doubt the function needs to be public so that keyword can (or rather, should) be omitted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)