ajuda corrida
#1

ola pessoal estou tentando criar umas corridas de checkpoints mas ta dando estes erros aqui

Код:
D:\gmrpg\filterscripts\tesfsdecorrida.pwn(74) : error 010: invalid function or declaration
D:\gmrpg\filterscripts\tesfsdecorrida.pwn(78) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
codigo pawno

Quote:

// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_RED 0xD00207AA

#include <a_samp>

#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

new checkcorrida[MAX_PLAYERS];

new Float:ChecksAvenida[1][3] = {
{2021.9279,851.2713,6.4387}
};

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript

return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/iniciarcorrida", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
checkcorrida[playerid] = 0;
SetPlayerRaceCheckpoint(playerid, 0, ChecksAvenida[checkcorrida[playerid]][0], ChecksAvenida[checkcorrida[playerid]][1], ChecksAvenida[checkcorrida[playerid]][2], ChecksAvenida[checkcorrida[playerid] + 1][0], ChecksAvenida[checkcorrida[playerid] + 1][1], ChecksAvenida[checkcorrida[playerid] + 1][2], 8.0);
}
}
}
else
{
SendClientMessage(playerid, COLOR_RED, "Apenas Para Admins");
}
}



if(strcmp(cmdtext,"/entrarcorrida",true)==0){
checkcorrida[playerid] = 0;
SetPlayerRaceCheckpoint(playerid, 0, ChecksAvenida[checkcorrida[playerid]][0], ChecksAvenida[checkcorrida[playerid]][1], ChecksAvenida[checkcorrida[playerid]][2], ChecksAvenida[checkcorrida[playerid] + 1][0], ChecksAvenida[checkcorrida[playerid] + 1][1], ChecksAvenida[checkcorrida[playerid] + 1][2], 8.0);
}
return 1;
}
}


public OnPlayerEnterRaceCheckpoint(playerid)
{
if(checkcorrida[playerid] == 1)
{
SendClientMessage(playerid, 0xFFFF00AA, "Vocк terminou a corrida!");
DisablePlayerRaceCheckpoint(playerid);
checkcorrida[playerid] = 0;
return 1;
}
else
{
DisablePlayerCheckpoint(playerid);
checkcorrida[playerid] ++;
SetPlayerRaceCheckpoint(playerid, 0, ChecksAvenida[checkcorrida[playerid]][0], ChecksAvenida[checkcorrida[playerid]][1], ChecksAvenida[checkcorrida[playerid]][2], ChecksAvenida[checkcorrida[playerid] + 1][0], ChecksAvenida[checkcorrida[playerid] + 1][1], ChecksAvenida[checkcorrida[playerid] + 1][2], 8.0);
return 1;
}
}

Reply
#2

por acaso a linha do erro e essa ?
pawn Код:
new Float:ChecksAvenida[1][3] = {
{2021.9279,851.2713,6.4387}
};
Reply
#3

as linhas que da erro sao estas

Quote:

D:\gmrpg\filterscripts\tesfsdecorrida.pwn(74) : error 010: invalid function or declaration
D:\gmrpg\filterscripts\tesfsdecorrida.pwn(7 : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

74 e 78
Reply
#4

Tente isso:

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
#define FILTERSCRIPT
#define COLOR_RED 0xD00207AA

#include <a_samp>

#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

new checkcorrida[MAX_PLAYERS];

new Float:ChecksAvenida[1][3] = {
{2021.9279,851.2713,6.4387}
};

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/iniciarcorrida", true) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            for(new i = 0; i < GetMaxPlayers(); i++)
            {
                checkcorrida[i] = 0;
                SetPlayerRaceCheckpoint(playerid, 0, ChecksAvenida[checkcorrida[playerid]][0], ChecksAvenida[checkcorrida[playerid]][1], ChecksAvenida[checkcorrida[playerid]][2], ChecksAvenida[checkcorrida[playerid] + 1][0], ChecksAvenida[checkcorrida[playerid] + 1][1], ChecksAvenida[checkcorrida[playerid] + 1][2], 8.0);
            }
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_RED, "Apenas Para Admins");
    }

    if(strcmp(cmdtext,"/entrarcorrida",true)==0)
    {
        checkcorrida[playerid] = 0;
        SetPlayerRaceCheckpoint(playerid, 0, ChecksAvenida[checkcorrida[playerid]][0], ChecksAvenida[checkcorrida[playerid]][1], ChecksAvenida[checkcorrida[playerid]][2], ChecksAvenida[checkcorrida[playerid] + 1][0], ChecksAvenida[checkcorrida[playerid] + 1][1], ChecksAvenida[checkcorrida[playerid] + 1][2], 8.0);
    }
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
        if(checkcorrida[playerid] == 1)
        {
            SendClientMessage(playerid, 0xFFFF00AA, "Vocк terminou a corrida!");
            DisablePlayerRaceCheckpoint(playerid);
            checkcorrida[playerid] = 0;
            return 1;
        }
        else
        {
            DisablePlayerCheckpoint(playerid);
            checkcorrida[playerid] ++;
            SetPlayerRaceCheckpoint(playerid, 0, ChecksAvenida[checkcorrida[playerid]][0], ChecksAvenida[checkcorrida[playerid]][1], ChecksAvenida[checkcorrida[playerid]][2], ChecksAvenida[checkcorrida[playerid] + 1][0], ChecksAvenida[checkcorrida[playerid] + 1][1], ChecksAvenida[checkcorrida[playerid] + 1][2], 8.0);
            return 1;
        }
}
Reply
#5

Quote:

D:\gmrpg\filterscripts\tesfsdecorrida.pwn(73) : error 010: invalid function or declaration
D:\gmrpg\filterscripts\tesfsdecorrida.pwn(77) : error 010: invalid function or declaration
D:\gmrpg\filterscripts\tesfsdecorrida.pwn(97) : error 030: compound statement not closed at the end of file (started at line 82)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

nao deu
Reply
#6

ja editei lб, tenta denovo
Reply
#7

ok amigo agora compilo abrigado pela ajuda vo testa ele agora
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)