Ajudem-me nuns errors do pawno!
#1

Код:
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>

#pragma tabsize 0
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

new PortaoKoW1;

PortaoKoW1 = CreateDynamicObject(980, 213.90, 1875.30, 13.15, 0.00, 0.00, 180.0);

public OnPlayerCommandText(playerid, cdmtext[]) {
if(strcmp(cmdtext, "/abrirbase", true) == 0)
{
MoveDynamicObject(PortaoKoW1, 213.90, 1875.30, 13.15, 2.0);
SendClientMessage(playerid,0xFF00FF,"A base estб aberta!");
return 1;}
Well, know that I am still a beginner and I am a turd in script, just know edit, then when you guys read this code will understand oq want to do, so when I compile I see these errors:

Код:
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(10) : error 010: invalid function or declaration
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(12) : error 025: function heading differs from prototype
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(13) : error 017: undefined symbol "cmdtext"
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(18) : error 030: compound statement not closed at the end of file (started at line 13)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Someone help me fix the code??
Reply
#2

Quote:
Originally Posted by LikeLikeLikeMe
Посмотреть сообщение
Код:
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>

#pragma tabsize 0
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

new PortaoKoW1;

PortaoKoW1 = CreateDynamicObject(980, 213.90, 1875.30, 13.15, 0.00, 0.00, 180.0);

public OnPlayerCommandText(playerid, cdmtext[]) {
if(strcmp(cmdtext, "/abrirbase", true) == 0)
{
MoveDynamicObject(PortaoKoW1, 213.90, 1875.30, 13.15, 2.0);
SendClientMessage(playerid,0xFF00FF,"A base estб aberta!");
return 1;}
Well, know that I am still a beginner and I am a turd in script, just know edit, then when you guys read this code will understand oq want to do, so when I compile I see these errors:

Код:
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(10) : error 010: invalid function or declaration
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(12) : error 025: function heading differs from prototype
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(13) : error 017: undefined symbol "cmdtext"
C:\Users\Matheus Alves\Desktop\SERVER\filterscripts\base_cmds.pwn(18) : error 030: compound statement not closed at the end of file (started at line 13)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Someone help me fix the code??
Change this:
public OnPlayerCommandText(playerid, cdmtext[]) {
if(strcmp(cmdtext, "/abrirbase", true) == 0)
{
MoveDynamicObject(PortaoKoW1, 213.90, 1875.30, 13.15, 2.0);
SendClientMessage(playerid,0xFF00FF,"A base estб aberta!");
return 1;}

To:

public OnPlayerCommandText(playerid, cdmtext[])
{
if(strcmp(cmdtext, "/abrirbase", true) == 0)
{
MoveDynamicObject(PortaoKoW1, 213.90, 1875.30, 13.15, 2.0);
SendClientMessage(playerid,0xFF00FF,"A base estб aberta!");
}
return 1;
}

or

public OnPlayerCommandText(playerid, cdmtext[])
{
if(strcmp(cmdtext, "/abrirbase", true) == 0)
{
MoveDynamicObject(PortaoKoW1, 213.90, 1875.30, 13.15, 2.0);
SendClientMessage(playerid,0xFF00FF,"A base estб aberta!");
}
}
Reply
#3

That undefined symbol, cmdtext is because he wrote cdmtext on public OnPlayerCommandText(playerid, cmdtext[]) this line.

Also, you can't create an object without any functions.

Anyway i fixed your script and should work now

pawn Код:
#define FILTERSCRIPT
#include <a_samp>
#include <streamer>

#pragma tabsize 0
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

new PortaoKoW1;

public OnFilterScriptInit()
{
    PortaoKoW1 = CreateDynamicObject(980, 213.90, 1875.30, 13.15, 0.00, 0.00, 180.0);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/abrirbase", true) == 0)
    {
    MoveDynamicObject(PortaoKoW1, 213.90, 1875.30, 13.15, 2.0);
    SendClientMessage(playerid,0xFF00FF,"A base estб aberta!");
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)