Xtrem_Maddox Posted March 16, 2021 Report Share Posted March 16, 2021 Salut. M-am chinuit o gramada sa pun un GM up-to-date cu noile includes si as vrea totusi sa reusesc sa-l rulez pana la urma. Am urmatoarele erori: Citat (22101) : error 035: argument type mismatch (argument 2) (22497) : error 035: argument type mismatch (argument 2) (24776) : error 035: argument type mismatch (argument 2) (24777) : error 035: argument type mismatch (argument 2) Iar liniile respective sunt, in ordine, urmatoarele: Citat PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos); ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0); ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync); // Pre-load animation library return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync); Vreo idee ce este gresit? Quote Link to comment Share on other sites More sharing options...
0 danuts Posted March 16, 2021 Report Share Posted March 16, 2021 De obicei, această eroare „argument type mismatch” înseamnă că introduci un tip de argument într-o funcție care are nevoie să primească un argument de alt tip, de ex.: vei primi această eroare, dacă introduci un integer într-o funcție care necesită un string. 1 Quote Link to comment Share on other sites More sharing options...
0 Xtrem_Maddox Posted March 16, 2021 Author Report Share Posted March 16, 2021 (edited) Citat stock PlayStream(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) { if(GetPVarType(playerid, "pAudioStream")) StopAudioStreamForPlayer(playerid); else SetPVarInt(playerid, "pAudioStream", 1); PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos); } Citat PreloadAnimLib(playerid, const animlib[]) { ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0); } Citat stock ApplyPlayerAnimation(playerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0) { ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync); // Pre-load animation library return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync); } Acestea sunt liniile full, in caz ca imi poate indica cineva ce as putea schimba in ele incat sa se compileze cum trebuie. Acum 5 ore, matei_ a spus: De obicei, această eroare „argument type mismatch” înseamnă că introduci un tip de argument într-o funcție care are nevoie să primească un argument de alt tip, de ex.: vei primi această eroare, dacă introduci un integer într-o funcție care necesită un string. Am mai vazut raspunsul acesta pe alt site, doar ca in engleza. Cu toate acestea, nu am nicio idee ce as putea schimba in linii ca sa fie treaba buna. Edited March 16, 2021 by Xtrem_Maddox Quote Link to comment Share on other sites More sharing options...
0 danuts Posted March 17, 2021 Report Share Posted March 17, 2021 Am găsit funcțiile pe care le folosești într-un vechi gamemode-ul de-al meu, tot ceea ce trebuia să faci era să ștergi „const”: stock PlayStream(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) { if(GetPVarType(playerid, "pAudioStream")) StopAudioStreamForPlayer(playerid); else SetPVarInt(playerid, "pAudioStream", 1); PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos); } stock ApplyPlayerAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0) { ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync); // Pre-load animation library return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync); } PreloadAnimLib(playerid, animlib[]) return ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0, 0); Quote Link to comment Share on other sites More sharing options...
0 Xtrem_Maddox Posted March 17, 2021 Author Report Share Posted March 17, 2021 Acum 10 ore, matei_ a spus: Am găsit funcțiile pe care le folosești într-un vechi gamemode-ul de-al meu, tot ceea ce trebuia să faci era să ștergi „const”: stock PlayStream(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0) { if(GetPVarType(playerid, "pAudioStream")) StopAudioStreamForPlayer(playerid); else SetPVarInt(playerid, "pAudioStream", 1); PlayAudioStreamForPlayer(playerid, url, posX, posY, posZ, distance, usepos); } stock ApplyPlayerAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0) { ApplyAnimation(playerid, animlib, "null", fDelta, loop, lockx, locky, freeze, time, forcesync); // Pre-load animation library return ApplyAnimation(playerid, animlib, animname, fDelta, loop, lockx, locky, freeze, time, forcesync); } PreloadAnimLib(playerid, animlib[]) return ApplyAnimation(playerid, animlib, "null", 0.0, 0, 0, 0, 0, 0, 0); Iti multumesc frumos, asta a rezolvat cele 4 erori. Acum insa primesc "Pawn Compiler library has stopped working" si imi da 2 warninguri: Citat warning 201: redefinition of constant/macro (symbol "SCM") warning 203: symbol is never used: "YSI_MAYBE_HEAP_MALLOC" Banuiesc ca stopped working da fiindca ar fi pe undeva prin script o paranteza care nu a fost inchisa/deschisa pe cealalta parte? Daca e asa, ma dau batut, scriptul e prea mare sa pot gasi asa ceva. Ciudat e ca developer-ul a spus ca n-ar trebui sa afiseze absolut niciun warning sau eroare. Quote Link to comment Share on other sites More sharing options...
0 danuts Posted March 17, 2021 Report Share Posted March 17, 2021 Acum 1 minut, Xtrem_Maddox a spus: Iti multumesc frumos, asta a rezolvat cele 4 erori. Acum insa primesc "Pawn Compiler library has stopped working" si imi da 2 warninguri: Banuiesc ca stopped working da fiindca ar fi pe undeva prin script o paranteza care nu a fost inchisa/deschisa pe cealalta parte? Daca e asa, ma dau batut, scriptul e prea mare sa pot gasi asa ceva. Ciudat e ca developer-ul a spus ca n-ar trebui sa afiseze absolut niciun warning sau eroare. Pentru primul warning, adauga: #define SCM SendClientMessage Pentru al doilea warning, adauga: #define YSI_MAYBE_HEALP_MALLOC Acestea doua le adaugi undeva langa celelalte definitii. Iar compiler-ul iti da crash, datorita unei paranteze uitate. Quote Link to comment Share on other sites More sharing options...
Question
Xtrem_Maddox
Salut. M-am chinuit o gramada sa pun un GM up-to-date cu noile includes si as vrea totusi sa reusesc sa-l rulez pana la urma. Am urmatoarele erori:
Iar liniile respective sunt, in ordine, urmatoarele:
Vreo idee ce este gresit?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.