SA-MP Forums Archive
Invalid function - 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: Invalid function (/showthread.php?tid=433176)



Invalid function - ajmac22 - 26.04.2013

pawn Код:
if (strcmp("/armor", cmdtext, true, 10) == 0)
{
                    if(IsPlayerInRangeOfPoint(playerid,0.532,2496.2458,-1711.9066,1014.7422))//cjsarmor
                {
                    SetPlayerArmor(playerid,100);//cjsarmor
                }
                    else
                    SendClientMessage(playerid,white,"You are not in range of the exit!");
                    return 1;
}
what is wrong.. I dont understand?

Код:
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(78) : warning 217: loose indentation
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(133) : warning 217: loose indentation
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(135) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(137) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(140) : error 054: unmatched closing brace ("}")
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(141) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(143) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.



Re: Invalid function - Civilian - 26.04.2013

pawn Код:
if (strcmp("/armor", cmdtext, true, 10) == 0)
    {
    if(IsPlayerInRangeOfPoint(playerid,0.532,2496.2458,-1711.9066,1014.7422))//cjsarmor
    {
    SetPlayerArmour(playerid,100);//cjsarmor
    }
    else
    SendClientMessage(playerid,COLOR_RED,"You are not in range of the exit!");
    return 1;
    }



Re: Invalid function - ajmac22 - 26.04.2013

I dont want you to do my scripting for me, I want to know what is wrong with it


Re: Invalid function - ajmac22 - 26.04.2013

How would you suggest I make it organized?


Re: Invalid function - ajmac22 - 26.04.2013

I think this is fixed yes ? I still get error..

pawn Код:
if (strcmp("/armor", cmdtext, true, 10) == 0)
{
    if(IsPlayerInRangeOfPoint(playerid,0.532,2496.2458,-1711.9066,1014.7422))//cjsarmor
    {
        SetPlayerArmour(playerid,100);//cjsarmor
    }
    else
    {
        SendClientMessage(playerid,COLOR_RED,"You are not in range of the exit!");
    }
    return 1;


Код:
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(132) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(134) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(138) : error 010: invalid function or declaration
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(142) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Invalid function - Civilian - 26.04.2013

Man i fix your Code you use mycode Code


Re: Invalid function - ajmac22 - 26.04.2013

It didnt work


Re: Invalid function - nor15 - 26.04.2013

PHP код:
if (strcmp("/armor"cmdtexttrue6) == 0)
{
if(
IsPlayerInRangeOfPoint(playerid,0.532,2496.2458,-1711.9066,1014.7422))//cjsarmor
{
 
SetPlayerArmour(playerid,100);//cjsarmor
 
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not in range of the exit!");
 }
 return 
1;

Try this


Re: Invalid function - ajmac22 - 26.04.2013

pawn Код:
if (strcmp("/armor", cmdtext, true, 6) == 0)//132
{
* * if(IsPlayerInRangeOfPoint(playerid,0.532,2496.2458,-1711.9066,1014.7422))//cjsarmor
* * {
* * * * SetPlayerArmour(playerid,100);//cjsarmor
* * }
* * else
* * {
* * * * SendClientMessage(playerid,COLOR_RED,"You are not in range of the exit!");
* * }
* * return 1;
}
Код:
C:\Users\Austin\Desktop\pawno\gamemodes\test1.pwn(132) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



AW: Invalid function - HurtLocker - 26.04.2013

Everything seems fine. Do you have this under onplayercommandtext?