22.05.2013, 19:39
eu ponhei um comando de /comprarveiculo tals mais fica dando esse error n sei pq
+ REPLY REPUT...
pawn Код:
if(strcmp(cmdtext, "/comprarveiculo", true) == 0)
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
for(new carro = 0; carro < MAX_CARROS; carro++) {
format(string, sizeof(string), "carro%d.ini", carro);// LINHA DO ERRO
if(strcmp(dini_Get(string, "Dono"), pname, true) == 0) {
SendClientMessage(playerid, Vermelho, "| ERRO | Vocк jб tem um veiculo e nгo pode comprar outro.");
return 1;
}
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleSeat(playerid) == 0 && VehicleID == dini_Int(string, "Id")) {
if(GetPlayerGrana(playerid) >= dini_Int(string, "Preco")) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
dini_IntSet(string, "TDono", 1);
dini_Set(string, "Dono", aname);
SendClientMessage(playerid, -1, "| INFO | Veiculo comprado com sucesso!");
SendClientMessage(playerid, -1, "| INFO | Para ver as funзхes de seu veiculo, Use: '/meuveiculo'.");
GivePlayerGrana(playerid, -dini_Int(string, "Preco"));
TogglePlayerControllable(playerid, 1);
return 1;
}
else {
SendClientMessage(playerid, Vermelho, "| ERRO | Vocк nгo tem dinheiro suficiente!");
}
}
}
return 1;
}
pawn Код:
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(3265) : error 017: undefined symbol "string"
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(3265) : error 017: undefined symbol "string"
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(3265) : error 029: invalid expression, assumed zero
C:\Users\pppp\Desktop\MeuRPG\gamemodes\RPG.pwn(3265) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.