DCMD Help!

Započeo Misko, Jun 23, 2009, 20:01:27 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Komanda:
dcmd_stunt(playerid, params[])
{
new
igrac;
if (sscanf(params, "u", igrac)) SendClientMessage(playerid, 0xFF0000AA, "Koristi: /stunt [playerid/partname]");
else if (igrac == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Igrac nije pronadjen!");
else
{
               EnableStuntBonusForPlayer(igrac,1);
SendClientMessage(igrac, 0x00FF00AA, "Mozete stuntati!");

}
return 1;
}



Errori
D:\Dokumenti!\Owner\My Documents\sa-mp\gamemodes\gf.pwn(8135) : error 017: undefined symbol "dcmd_stunt"
D:\Dokumenti!\Owner\My Documents\sa-mp\gamemodes\gf.pwn(8140) : warning 225: unreachable code
D:\Dokumenti!\Owner\My Documents\sa-mp\gamemodes\gf.pwn(21600) : error 017: undefined symbol "dcmd_stunt"
D:\Dokumenti!\Owner\My Documents\sa-mp\gamemodes\gf.pwn(21604) : error 017: undefined symbol "params"
D:\Dokumenti!\Owner\My Documents\sa-mp\gamemodes\gf.pwn(21609) : warning 217: loose indentation
D:\Dokumenti!\Owner\My Documents\sa-mp\gamemodes\gf.pwn(21615) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.


Poslednja Izmena: Jun 25, 2009, 22:02:07 POSLE PODNE od zerocoolos

Correlli

Izgleda da nemaš dcmd define u skripti. (http://forum.sa-mp.com/index.php?topic=70925.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
Poslednja Izmena: Jun 23, 2009, 21:43:51 POSLE PODNE od Don Correlli


Nedostaje ti ovo, u pl. Command

{
     dcmd(stunt, 4, cmdtext);
     return 0;
}



Poslednja Izmena: Jun 24, 2009, 11:48:31 PRE PODNE od Balkanika

Citat: Balkanika poslato Jun 24, 2009, 11:47:54 PRE PODNE
Nedostaje ti ovo, u pl. Command

{
      dcmd(stunt, 4, cmdtext);
      return 0;
}




To vec jesam  :D :(

Correlli

A gdje si stavio #define dcmd(.. u svojoj skripti? Moraš ga staviti iznad dcmd komandi, najbolje da na početku skripte.

#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
#define MAX_STRING 255
#define CHECKPOINT_NONE 0
#define CHECKPOINT_HOME 12
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
...itd