[Ajuda] Warning 213 - Tag Mismatch
#1

PHP код:
stock SalvarCarros()
{
    new 
file[120];
    {
    for(new 
idx 1idx MAX_CARROSidx ++) 
    {
    
format(file120PastaCARROSidx);
    if(
DOF2_FileExists(file))     
        
DOF2_SetInt(file"Modelo"InfoCarros[idx][cModel]);
        
DOF2_SetInt(file"LocalX"InfoCarros[idx][cLocationx]); //Warning Aqui
        
DOF2_SetInt(file"LocalY"InfoCarros[idx][cLocationy]); //Warning Aqui
        
DOF2_SetInt(file"LocalZ"InfoCarros[idx][cLocationz]); //Warning Aqui
        
DOF2_SetInt(file"Angulo"InfoCarros[idx][cAngle]);//Warning Aqui
        
DOF2_SetInt(file"Cor1"InfoCarros[idx][cColorOne]);
        
DOF2_SetInt(file"Cor2"InfoCarros[idx][cColorTwo]);
        
DOF2_SetInt(file"Dono"InfoCarros[idx][cOwner]);
        
DOF2_SetInt(file"Valor"InfoCarros[idx][cValue]);
        
DOF2_SetInt(file"TemDono"InfoCarros[idx][cOwned]);
        
DOF2_SetInt(file"Fechado"InfoCarros[idx][cLock]);
        
DOF2_SetInt(file"Cmod1"InfoCarros[idx][cmod1]);
        
DOF2_SetInt(file"Cmod2"InfoCarros[idx][cmod2]);
        
DOF2_SetInt(file"Cmod3"InfoCarros[idx][cmod3]);
        
DOF2_SetInt(file"Cmod4"InfoCarros[idx][cmod4]);
        
DOF2_SetInt(file"Cmod5"InfoCarros[idx][cmod5]);
        
DOF2_SetInt(file"Cmod6"InfoCarros[idx][cmod6]);
        
DOF2_SetInt(file"Cmod7"InfoCarros[idx][cmod7]);
        
DOF2_SetInt(file"Cmod8"InfoCarros[idx][cmod8]);
        
DOF2_SetInt(file"Cmod9"InfoCarros[idx][cmod9]);
        
DOF2_SetInt(file"Cmod10"InfoCarros[idx][cmod10]);
        
DOF2_SetInt(file"Cmod11"InfoCarros[idx][cmod11]);
        
DOF2_SetInt(file"Cmod12"InfoCarros[idx][cmod12]);
        
DOF2_SetInt(file"Cmod13"InfoCarros[idx][cmod13]);
        
DOF2_SetInt(file"Cmod14"InfoCarros[idx][cmod14]);
        
DOF2_SetInt(file"Cmod15"InfoCarros[idx][cmod15]);
        }
    }    

PHP код:
C:\Users\Leonardo\Desktop\Gm para textdraw\gamemodes\bare.pwn(523) : warning 213tag mismatch
C
:\Users\Leonardo\Desktop\Gm para textdraw\gamemodes\bare.pwn(524) : warning 213tag mismatch
C
:\Users\Leonardo\Desktop\Gm para textdraw\gamemodes\bare.pwn(525) : warning 213tag mismatch
C
:\Users\Leonardo\Desktop\Gm para textdraw\gamemodes\bare.pwn(526) : warning 213tag mismatch 
Eu estou tentando usar esse sistema para salvar os carros da concessionaria, mas estб dando essa warning alguem pode me ajudar?
Reply
#2

iAplle.

Vocк estб setando inteira em float, mude os DOF2_SetInt das linhas do erro por DOF2_SetFloat



Para descobrir oque й uma float, sгo nъmeros nгo-inteiros, como: 1.000, 0.2000, ou seja, eles sempre terгo um ponto, assim vocк usarб as funзхes para float, nгo para inteira.
Reply
#3

O correto й salvar em float.
PHP код:
DOF2_SetFloat(file"LocalX"InfoCarros[idx][cLocationx]);
DOF2_SetFloat(file"LocalY"InfoCarros[idx][cLocationy]);
DOF2_SetFloat(file"LocalZ"InfoCarros[idx][cLocationz]);
DOF2_SetFloat(file"Angulo"InfoCarros[idx][cAngle]); 
Reply
#4

Obrigado galera, as warnings sumiram, mas estб ficando tudo em zero.

Quote:

LocalX = 0.00000000
LocalY = 0.00000000
LocalZ = 0.00000000
Angulo = 0.00000000
Cor1 = 0
Cor2 = 0
Dono = 0
Valor = 0
TemDono = 0
Fechado = 0
Cmod1 = 0
Cmod2 = 0
Cmod3 = 0
Cmod4 = 0
Cmod5 = 0
Cmod6 = 0
Cmod7 = 0
Cmod8 = 0
Cmod9 = 0
Cmod10 = 0
Cmod11 = 0
Cmod12 = 0
Cmod13 = 0
Cmod14 = 0
Cmod15 = 0
Modelo = 0

Reply
#5

Mostre como vocк estб getando os valores em cLocationx, y, z e angle
Reply
#6

PHP код:
stock CreateDealershipCar(playeridname[MAX_PLAYER_NAME], priceFloat:posXFloat:posYFloat:posZFloat:angle)
{
    new 
model ReturnVehicleID(name);
    new 
sendername[20];
    if(
GetPlayerMoney(playerid) < price) return SendClientMessage(playerid0xFFFFFFFF"Vocк nгo tem dinheiro suficiente!");
    {
        new 
colorOne random(255);
        new 
colorTwo random(255);
        new 
idcar CreateVehicle(model,posX,posY,posZ,angle,colorOne,colorTwo,60000);
        
InfoCarros[idcar][cModel] = model;
        
SendClientMessage(playerid0xFFFFFFFF"Parabйns pelo seu carro!");
        
InfoCarros[idcar][cLocationx] = posX;
        
InfoCarros[idcar][cLocationy] = posY;
        
InfoCarros[idcar][cLocationz] = posZ;
        
InfoCarros[idcar][cAngle] = angle;
        
InfoCarros[idcar][cColorOne] = colorOne;
        
InfoCarros[idcar][cColorTwo] = colorTwo;
        
InfoCarros[idcar][cValue] = price;
        
InfoCarros[idcar][cOwned] = 1;
        
GivePlayerMoney(playerid,-price);
        
GetPlayerName(playeridsendernamesizeof(sendername));
        
strmid(InfoCarros[idcar][cOwner], sendername0strlen(sendername), 999);
        
SalvarCarros();
    }
    return 
1;

Estou setando os carros assim.
Reply
#7

Como vocк estб usando a funзгo CreateDealershipCar, mostre os parвmetros usados.
Reply
#8

Aqui estб oque eu estou usando https://pastebin.com/aU7vQDkA
Jб tentei de varias formas mas nгo foi, eu mesmo tentei criar essa base pegando algumas coisas de outro Fs.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)