errors
#1

Im getting errors at compiling.. And I cant seem to fix it..
Anyone know how and what to do?
Or maybe someone could fix it for me?
And btw.. I just typed the LINE 84152 etc.. myself.. this is NOT in the code

Код:
LINE 84152->>>    public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/entermech", true))
    if(!IsPlayerInRangeOfPoint(playerid,5,1790.2391,-1720.8370,13.5395))
    {
        SetPlayerPos(playerid,-2029.798339,-106.675910,1035.171875);
        SetPlayerInterior(playerid,3);
        GameTextForPlayer(playerid,"Welcome to Cobomau Mechanics",4000,6);
        return 1;
    }
    
public ResetCommands(playerid)
{
	Commands[playerid] = 0;
	return 1;
}
public ResetText(playerid)
{
	Text[playerid] = 0;
	return 1;
LINE 84172 -->>>      public CheckDist(playerid,playerid2)
{
	if(GetDistanceBetweenPlayers(playerid,playerid2) > 15)
	{
	    new string[128], sendername[MAX_PLAYER_NAME];

	    GetPlayerName(playerid, sendername, sizeof(sendername));

		KillTimer(cufftimer[playerid]);
	    PlayerCuffed[playerid] = 0;
		TogglePlayerControllable(playerid, 0);
		SetPlayerColor(playerid, 0xFF660000);
		GaveUp[playerid] = 1;
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "Cuffs failed, wait until a cop cuffs you");
		SendClientMessage(playerid, COLOR_CREAM, "Do not attempt to escape, you can be killed / kicked!");
		format(string, sizeof(string), "[HQ]: Criminal %s (%d)'s cuffs have failed, hold your fire and CUFF him!",sendername,playerid);
		SendRadioMessage(1,COLOR_BLUE,string);
		SendRadioMessage(2,COLOR_BLUE,string);
		SendRadioMessage(3,COLOR_BLUE,string);
		LoopingAnim(playerid, "ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0);
	}
	return 1;
}
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84152) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84152) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84154) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84163) : warning 217: loose indentation
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84163) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(8416 : warning 225: unreachable code
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(8416 : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84172) : warning 225: unreachable code
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84172) : warning 217: loose indentation
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84172) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84172) : error 004: function "CheckDist" is not implemented
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84174) : error 017: undefined symbol "playerid2"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84195) : error 030: compound statement not closed at the end of file (started at line 84170)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Reply
#2

80k lines? o.o

Try this:

pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext, "/entermech", true))
    {
        if(!IsPlayerInRangeOfPoint(playerid,5,1790.2391,-1720.8370,13.5395))
        {
            SetPlayerPos(playerid,-2029.798339,-106.675910,1035.171875);
            SetPlayerInterior(playerid,3);
            GameTextForPlayer(playerid,"Welcome to Cobomau Mechanics",4000,6);
            return 1;
        }
    }
}
forward ResetCommands(playerid);
public ResetCommands(playerid)
{
    Commands[playerid] = 0;
    return 1;
}
forward ResetText(playerid);
public ResetText(playerid)
{
    Text[playerid] = 0;
    return 1;
}
forward CheckDist(playerid,playerid2);
public CheckDist(playerid,playerid2)
{
    if(GetDistanceBetweenPlayers(playerid,playerid2) > 15)
    {
        new string[128], sendername[MAX_PLAYER_NAME];

        GetPlayerName(playerid, sendername, sizeof(sendername));

        KillTimer(cufftimer[playerid]);
        PlayerCuffed[playerid] = 0;
        TogglePlayerControllable(playerid, 0);
        SetPlayerColor(playerid, 0xFF660000);
        GaveUp[playerid] = 1;
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Cuffs failed, wait until a cop cuffs you");
        SendClientMessage(playerid, COLOR_CREAM, "Do not attempt to escape, you can be killed / kicked!");
        format(string, sizeof(string), "[HQ]: Criminal %s (%d)'s cuffs have failed, hold your fire and CUFF him!",sendername,playerid);
        SendRadioMessage(1,COLOR_BLUE,string);
        SendRadioMessage(2,COLOR_BLUE,string);
        SendRadioMessage(3,COLOR_BLUE,string);
        LoopingAnim(playerid, "ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0);
    }
    return 1;
}
Reply
#3

I tryd your code but I get 13 errors in just that part of code:

C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84152) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84152) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84154) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84165) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84166) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84171) : warning 225: unreachable code
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84171) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84172) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84177) : warning 225: unreachable code
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84177) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84177) : error 004: function "CheckDist" is not implemented
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(8417 : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(8417 : error 004: function "CheckDist" is not implemented
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84180) : error 017: undefined symbol "playerid2"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84201) : error 030: compound statement not closed at the end of file (started at line 84150)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


13 Errors.


I find this weird cause the before I added the 'entermech' teleport thingy I had no errors at all but now it seems to give errors on random places
Reply
#4

Код:
{
if (strcmp("/entermech", cmdtext, true, 10) == 0)
{ < ------ This wasn't here before. its required.
    if(!IsPlayerInRangeOfPoint(playerid,5,1790.2391,-1720.8370,13.5395))
    {
        SetPlayerPos(playerid,-2029.798339,-106.675910,1035.171875);
        SetPlayerInterior(playerid,3);
        GameTextForPlayer(playerid,"Welcome to Cobomau Mechanics",4000,6);
        return 1;
    }
}
Little Issue I noticed, There..

Also! Playerid2 isn't defined anywhere
you might use this " GetPlayerName(playerid, sendername, sizeof(sendername));"
to Define it
Example
GetPlayerName(playerid, playerid2, sizeof(playerid2));

Find a way to incorporate that

I Dont really want to help re-write that whole script. So Just take what I said there and try and apply it
Reply
#5

managed to fix id2

now only this one:

C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84152) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84154) : error 017: undefined symbol "cmdtext"
Reply
#6

I tried a lot but stil not working:/
Reply
#7

new error:


C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84144) : warning 225: unreachable code
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84144) : warning 217: loose indentation
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84144) : error 029: invalid expression, assumed zero
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84144) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84146) : error 017: undefined symbol "cmdtext"
C:\Users\Milan\Documents\Nieuwe map\larp.pwn(84157) : error 030: compound statement not closed at the end of file (started at line 84000)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


script starting at line 84144

Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
    if(!strcmp(cmdtext, "/entermech", true))
    {
        if(!IsPlayerInRangeOfPoint(playerid,5,1790.2391,-1720.8370,13.5395))
        {
            SetPlayerPos(playerid,-2029.798339,-106.675910,1035.171875);
            SetPlayerInterior(playerid,3);
            GameTextForPlayer(playerid,"Welcome to Cobomau Mechanics",4000,6);
            return 1;
        }
    }
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)