error 010: invalid function or declaration
#7

Quote:
Originally Posted by oppo1234
Посмотреть сообщение
So how can I do
PHP код:
public OnPlayerUpdate(playerid

    if(
onetime[playerid]!=0
    { 
        if(
gettime()-onetime[playerid]>=10000
        { 
            
onetime[playerid]=0
            
SetPlayerPos(playerid,-315.17151519.659975.2519); 
        } 
        else 
        { 
            if(
IsPlayerInRangeOfPoint(playerid,150,-2636.62721406.4064906.2675)==0
            { 
                
SetPlayerPos(playerid,-2636.62721406.4064906.2675); 
                
SetPlayerInterior(playerid,3); 
            } 
        } 
    } 
//<--- Notice the return and the remaining } are gone.
    
if(twotime[playerid]!=0
    { 
        if(
gettime()-twotime[playerid]>=10000
        { 
            
twotime[playerid]=0
            
SetPlayerPos(playerid,-318.32691519.231375.2519); 
        } 
        else 
        { 
            if(
IsPlayerInRangeOfPoint(playerid,150,1205.0674, -8.39711000.6484)==0
            { 
                
SetPlayerPos(playerid,1205.0674, -8.39711000.6484); 
                
SetPlayerInterior(playerid,2); 
            } 
        } 
    } 
    return 
1

All you needed to do was remove the return 1, and the last brace ( } ), and it'll be fixed.

It's good to see you are using good indentation.
Reply


Messages In This Thread
error 010: invalid function or declaration - by oppo1234 - 01.12.2015, 06:35
Re: error 010: invalid function or declaration - by Sew_Sumi - 01.12.2015, 07:01
Re: error 010: invalid function or declaration - by oppo1234 - 01.12.2015, 07:03
Re: error 010: invalid function or declaration - by oppo1234 - 01.12.2015, 07:19
Re: error 010: invalid function or declaration - by Sew_Sumi - 01.12.2015, 07:19
Re: error 010: invalid function or declaration - by oppo1234 - 01.12.2015, 09:14
Re: error 010: invalid function or declaration - by Sew_Sumi - 01.12.2015, 10:31

Forum Jump:


Users browsing this thread: 1 Guest(s)