Invalid function
#1

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.
Reply
#2

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;
    }
Reply
#3

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

How would you suggest I make it organized?
Reply
#5

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.
Reply
#6

Man i fix your Code you use mycode Code
Reply
#7

It didnt work
Reply
#8

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
Reply
#9

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.
Reply
#10

Everything seems fine. Do you have this under onplayercommandtext?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)