Ayuda con este comando -
andySix - 04.09.2012
Hola estoy haciendo un comando que quiero que solo se use una sola vez, pero me sale esto
pawn Код:
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(2842) : error 017: undefined symbol "pGivedstats"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(4864) : error 017: undefined symbol "pGivedstats"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(5269) : error 017: undefined symbol "pGivedstats"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(5821) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9277) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9278) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9279) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9280) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9281) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9282) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9283) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9284) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9285) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(9286) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(28529) : error 017: undefined symbol "pGivedstats"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(28533) : error 017: undefined symbol "pGivedstats"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(28534) : warning 204: symbol is assigned a value that is never used: "darstats"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(28532) : warning 204: symbol is assigned a value that is never used: "expamount"
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50808) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50808) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50808) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50834) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50834) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50834) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50850) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50850) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50850) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50882) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50882) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(50882) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(53099) : warning 213: tag mismatch
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(53099) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Administrador\Escritorio\Role Play\gamemodes\lzrpv1.0.pwn(53099) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
//este es el comando los estoy haciendo asi
zcmd(tomarstats, playerid, params[])
{
if(Info[playerid][pGivedstats] < 0) return SendClientMessageEx(playerid, COLOR_GRAD2, "[ERROR]: Solo puedes usar este comando una vez.");
{
new nxtlevel = Info[playerid][pLevel]+1;
new expamount = nxtlevel*explevel;
new darstats = Info[playerid][pGivedstats]+1
{
expamount,Info[playerid][pExp]);
SendClientMessageEx(playerid, COLOR_YELLOW,"Se te dieron 200000$ mas Nivel %s.", expamount,Info[playerid][pExp]);
GivePlayerCash(playerid, 200000);
}
}
return 1;
}
// y asi
CMD:tomarstats(playerid, params[])
{
if(Info[playerid][pLevel] == 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Solo puedes usar este comando una vez.");
return 1;
}
else {
Info[playerid][pLevel] = 2;
Info[playerid][pDeaths]+1;
//new darstats = Info[playerid][pGivedstats]+1
SendClientMessageEx(playerid, COLOR_YELLOW,"Se te dieron 200000$ mas Nivel 2.");
GivePlayerCash(playerid, 200000);
}
return 1;
}
Ya los defini pero creo que algo no hice bien :S nose diganme dare +Rep

saludos, si hay otra menera mas sencilla de hacerlo diganme xD gracias
Respuesta: Ayuda con este comando -
Jose_grana - 04.09.2012
Como definiste pGivedstats?
Tienes de meterlo en el enum de la informaciуn de las cuentas de usuario que en la mayorнa de Gms es PlayerInfo
Respuesta: Ayuda con este comando -
Bu11Sh0t - 04.09.2012
Define el pGivedstats con UNO de estos dos mйtodos que te faltan.
pawn Код:
enum pGivedstats
{
Algo,
Algo[2]
}
new pGivedstats[MAX_PLAYERS][NombreDeEnum];
Y como tienes definido el SendClientMessageEx?
Respuesta: Ayuda con este comando -
andySix - 05.09.2012
Voy a intentar asi como me dices, ya lo habia puesto en un enum pero de otra forma lo pondre asi, bueno ya por anticipado se que funcionara xD, gracias chicos, (y) +Rep, de todas formas lo hice asi y funciono como yo queria x3 saludos
pawn Код:
CMD:tomarstats(playerid, params[])
{
if(Info[playerid][pLevel] != 1)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Solo puedes usar este comando una vez.");
return 1;
}
else {
Info[playerid][pLevel] = 2;
Info[playerid][pDeaths]+1;
SendClientMessageEx(playerid, COLOR_LIYELLOW,"Se te dieron 200000$ mas Nivel 2.");
GivePlayerCash(playerid, 200000);
}
return 1;
}