• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[AJUDA] Ajuda com c?digo
#1
Exclamation 
Eu tenho esta linha de c?digos:

Code:
CMD:cv(playerid, params[])

{

if(aInfo[playerid][Admin] == 0) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Voc? n?o tem permiss?o!");



new sVeiculo[50], vehicleid, modeloid, cor1, cor2;



if(sscanf(params, "s[50]dd", sVeiculo, cor1, cor2)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Uso correto: /CV [ Ve?culo ID / Nome ] [ Cor 1 ] [ Cor 2 ]");



if(cor1 < 0 || cor1 > 255 || cor2 < 0 || cor2 > 255) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Use IDs de cores de 0 a 255!");



if(IsNumeric(sVeiculo)) modeloid = strval(sVeiculo);

else modeloid = ReturnVehicleID(sVeiculo);



if(modeloid < 400 || modeloid > 611 || modeloid == -1) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Modelo de ve?culo inv?lido!");



new Float:pPos[4];



GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);

GetPlayerFacingAngle(playerid, pPos[3]);



vehicleid = CreateVehicle(modeloid, pPos[0], pPos[1], pPos[2], pPos[3], cor1, cor2, -1);



vCriado[vehicleid] = true;



LinkVehicleToInterior(vehicleid, GetPlayerInterior(playerid));

SetVehicleVirtualWorld(vehicleid, GetPlayerVirtualWorld(playerid));



PutPlayerInVehicle(playerid, vehicleid, 0);

PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);



format(gStr, sizeof(gStr), "[BPL] Ve?culo %s criado com sucesso! ( Modelo ID: %d - Ve?culo ID: %d )", GetVehicleModelNameEx(modeloid), modeloid, vehicleid);

? ? SendClientMessage(playerid, COLOR_VERDECMD, gStr);

? ? return 1;

}



CMD:criarveiculo(playerid, params[])

{

new sCMD[50];

format(sCMD, sizeof(sCMD), "/cv %s", params);



ExecutarComando(playerid, sCMD);

return 1;

}



// -------------------------------------------------------------------------------------------------------------- //



CMD:dv(playerid)

{

if(aInfo[playerid][Admin] == 0) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Voc? n?o tem permiss?o!");



if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Voc? n?o est? em um ve?culo!");



new vehicleid = GetPlayerVehicleID(playerid);



if(vCriado[vehicleid] == false) return SendClientMessage(playerid, COLOR_ERRO, "[ x ] Voc? s? pode destruir ve?culos criados!");



format(gStr, sizeof(gStr), "[BPL] Ve?culo %s exclu?do com sucesso! (ID %d)", GetVehicleModelName(vehicleid), vehicleid);

SendClientMessage(playerid, COLOR_VERDECMD, gStr);



sDestroyVehicle(vehicleid);

PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);



Streamer_Update(playerid);

return 1;

}





Por?m, ao compilar esses erros surgem e eu n?o entendo o porque:


Code:
C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(303) : warning 216: nested comment[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(312) : error 017: undefined symbol "Admin"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(320) : error 017: undefined symbol "IsNumeric"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(321) : error 017: undefined symbol "ReturnVehicleID"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(340) : error 017: undefined symbol "GetVehicleModelNameEx"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(350) : error 017: undefined symbol "ExecutarComando"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(358) : error 017: undefined symbol "Admin"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(366) : error 017: undefined symbol "GetVehicleModelName"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(369) : error 017: undefined symbol "sDestroyVehicle"[/align]



[align=left]C:\Users\Matheus\Desktop\BPL GAMES 2.0 - Copia\gamemodes\bpl.pwn(376) : warning 203: symbol is never used: "PlayerInfo"[/align]



[align=left]Pawn compiler 3.10.4 Copyright (c) 1997-2006, ITB CompuPhase[/align]







[align=left]8 Errors.[/align]



[align=left]







Poderiam me ajudar? E me dizer qual foi o causador dos erros?
  Reply
#2
Podem fechar, me desculpem o flood! Descobri os erros, faltavam stocks em minha GM!
  Reply
#3
N?o recomendo que use stock, basicamente a "GM" ira ignorar os erros que contem no sistema criado. Procure deixar os sistema sempre 100%, realizando v?rios testes dentre outros...
  Reply


Forum Jump: