Jump to content

[REZOLVAT] Problema Pawn.CMD


Jakewow
 Share

Recommended Posts

  • Username: Jakewow

  • Problemă Ã®ntâlnită: Nu pot sa mut de pe YSI/y_commands pe Pawn.CMD

Detalii despre problemă: Deci aveam inainte pe gm YSI/y_commands si vreau acum sa trec pe Pawn.CMD, am schimbat din "YCMD:"  in  "cmd:" la inceputul fiecarei comenzi, am schimbat din "Command_AddAltNamed("prescurtare" , "comanda");"  in  "alias:comanda("prescurtare");"   dar totusi primesc aceste erori, de la ce or fi?

Ce ai încercat să faci înainte să postezi?:

Cod sursă (recomandat pastebin.com):

Alte detalii: Erori:

C:\Users\Daniel\Desktop\GM Jakewow\pawno\include\Pawn.CMD.inc(58) : error 025: function heading differs from prototype

C:\Users\Daniel\Desktop\GM Jakewow\pawno\include\Pawn.CMD.inc(62) : error 025: function heading differs from prototype

C:\Users\Daniel\Desktop\GM Jakewow\pawno\include\Pawn.CMD.inc(79) : warning 201: redefinition of constant/macro (symbol "CMD")

C:\Users\Daniel\Desktop\GM Jakewow\pawno\include\Pawn.CMD.inc(80) : warning 201: redefinition of constant/macro (symbol "COMMAND")

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

 

 

2 Errors.

 

 

Link to comment
Share on other sites

  • Administrator

-> http://forum.sa-mp.com/showthread.php?t=608474

 

Trebuie sa modifici sintaxa comenzilor:

CMD:comanda( playerid, params[] )
{
   return 1;
}

Trebuie sa modifici OnPlayerCommand:

public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags) 
{ 
    if(result == -1) 
    { 
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command."); 

        return 0; 
    } 

    return 1; 
} 
Link to comment
Share on other sites

 

-> http://forum.sa-mp.com/showthread.php?t=608474

 

Trebuie sa modifici sintaxa comenzilor:

CMD:comanda( playerid, params[] )
{
   return 1;
}

Trebuie sa modifici OnPlayerCommand:

public OnPlayerCommandPerformed(playerid, cmd[], params[], result, flags) 
{ 
    if(result == -1) 
    { 
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: Unknown command."); 

        return 0; 
    } 

    return 1; 
} 

Multumesc!!! Am rezolvat toate erorile mai putin una singura, aceea fiind :

C:\Users\Daniel\Desktop\GM Jakewow\pawno\include\Pawn.CMD.inc(58) : error 025: function heading differs from prototype

Link to comment
Share on other sites

  • Administrator

Multumesc!!! Am rezolvat toate erorile mai putin una singura, aceea fiind :

C:\Users\Daniel\Desktop\GM Jakewow\pawno\include\Pawn.CMD.inc(58) : error 025: function heading differs from prototype

Arata functia la care ai eroarea aia.

Link to comment
Share on other sites

Am rezolvat, multumesc mult lui @@Leonard :)) mereu imi da raspunsul corect la fiecare problema/intrebare

Trebuia modificat din YCMD in CMD

Trebuia modificat din (playerid, params[], help) in (playerid, params[])

Trebuia modificat publicul OnPlayerCommandReceived

Trebuia modificat publicul OnPlayerCommandPerformed

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...