Fórum Erro Record, object or class type required no Delphi 7 #618813

12/10/2022

0

Boa tarde a todos!

Estou tendo um problema com esse código e gostaria de ajuda por favor.

function TForm1.PayLoad(ChavePIX: String;Beneficiario: String;Cidade: String;CodTransferencia: String;Valor: Real): String;
Var
CODPayLoad,Merchant_Account_Information_String,Valor_Total,txid,CRC: String;
begin
Merchant_Account_Information_String:= ''''''''0014BR.GOV.BCB.PIX01''''''''+Length(ChavePIX).ToString + ChavePIX;
Valor_Total:=FormatFloat(''''''''#####0.00;00.00'''''''',Valor);
Valor_Total:=StringReplace(Valor_Total,'''''''','''''''',''''''''.'''''''',[]);
txid:=''''''''05''''''''+FormatFloat(''''''''00'''''''',LengTh(CodTransferencia))+CodTransferencia;
CODPayLoad:=Payload_Format_Indicator+
Merchant_Account_Information+Length(Merchant_Account_Information_String).ToString+
Merchant_Account_Information_String+Merchant_Category_Code+Transaction_Currency+
FormatFloat(''''''''00'''''''',Length(Valor_Total))+Valor_Total+Country_Code+Merchant_Name+
FormatFloat(''''''''00'''''''',LengTh(Beneficiario))+Beneficiario+Merchant_City+FormatFloat(''''''''00'''''''',Length(Cidade))+
cidade+Additional_Data_Field_Template+FormatFloat(''''''''00'''''''',LengTh(txid))+txid+''''''''6304'''''''';
CRC:=inttohex(CRC16CCITT(CODPayLoad), 4);
result:=CODPayLoad+CRC;
end;


o erro ao compilar é nessa linha:
Merchant_Account_Information_String:= ''''''''0014BR.GOV.BCB.PIX01''''''''+Length(ChavePIX).ToString + ChavePIX

[Error] UPIX.pas(79): Record, object or class type required

Agradeço toda e qq ajuda.
Bruno Rafael

Bruno Rafael

Responder

Posts

15/10/2022

Bruno Rafael

Boa tarde a todos!

Estou tendo um problema com esse código e gostaria de ajuda por favor.

function TForm1.PayLoad(ChavePIX: String;Beneficiario: String;Cidade: String;CodTransferencia: String;Valor: Real): String;
Var
CODPayLoad,Merchant_Account_Information_String,Valor_Total,txid,CRC: String;
begin
Merchant_Account_Information_String:= ''''''''0014BR.GOV.BCB.PIX01''''''''+Length(ChavePIX).ToString + ChavePIX;
Valor_Total:=FormatFloat(''''''''#####0.00;00.00'''''''',Valor);
Valor_Total:=StringReplace(Valor_Total,'''''''','''''''',''''''''.'''''''',[]);
txid:=''''''''05''''''''+FormatFloat(''''''''00'''''''',LengTh(CodTransferencia))+CodTransferencia;
CODPayLoad:=Payload_Format_Indicator+
Merchant_Account_Information+Length(Merchant_Account_Information_String).ToString+
Merchant_Account_Information_String+Merchant_Category_Code+Transaction_Currency+
FormatFloat(''''''''00'''''''',Length(Valor_Total))+Valor_Total+Country_Code+Merchant_Name+
FormatFloat(''''''''00'''''''',LengTh(Beneficiario))+Beneficiario+Merchant_City+FormatFloat(''''''''00'''''''',Length(Cidade))+
cidade+Additional_Data_Field_Template+FormatFloat(''''''''00'''''''',LengTh(txid))+txid+''''''''6304'''''''';
CRC:=inttohex(CRC16CCITT(CODPayLoad), 4);
result:=CODPayLoad+CRC;
end;


o erro ao compilar é nessa linha:
Merchant_Account_Information_String:= ''''''''0014BR.GOV.BCB.PIX01''''''''+Length(ChavePIX).ToString + ChavePIX

[Error] UPIX.pas(79): Record, object or class type required

Agradeço toda e qq ajuda.
Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar