![]() |
[Pawn] Compilation error - Printable Version + open.mp forum (https://forum.open.mp) -- Forum: SA-MP (https://forum.open.mp/forumdisplay.php?fid=3) --- Forum: Pawn Scripting (https://forum.open.mp/forumdisplay.php?fid=10) --- Thread: [Pawn] Compilation error (/showthread.php?tid=3481) |
Compilation error - primat - 2025-09-05 I recieve this error message Quote:C:\Users\unity\Documents\Server\qawno\include\sscanf2.inc(33) : user error: Please include <a_npc> or <a_samp> first. but in my gamemode file it is already included Image Please help me someone RE: Compilation error - primat - 2025-09-05 Update! Ive fixed it ! But now i have some another issues and i need help to fix it! There is a list of errors RE: Compilation error - MrKacu13 - 2025-09-06 Oh, you added open.mp include so you have a two solutions: 1. Add #define SAMP_COMPAT before your includes. 2. Find actual callbacks syntax (it's different) on open.mp wiki and just replace it + for weapons id you should use macro definitions (not ID's). Probably textdraws need it too. First solution is's definitly a good option for you, beacause you don't need change anything in your code. Just add this define SAMP_COMPAT and gamemode should be build succesful. In line 51910 you have a redefinition of GetWeaponSlot function. It's arleady defined by default. RE: Compilation error - primat - 2025-09-07 (2025-09-06, 04:58 PM)MrKacu13 Wrote: Oh, you added open.mp include so you have a two solutions: There is one more error : Error and code RE: Compilation error - primat - 2025-09-07 This is a stock : Code: stock Convert(seconds, stringTos[], size = sizeof(stringTos)) RE: Compilation error - primat - 2025-09-07 I've already found an issue (chatGPT helped me) :) This happened because my Code: Convert Code: return stringTos; The solution was to remove the Code: return Code: new time[32]; Thanks to ChatGPT for helping me figure this out! RE: Compilation error - MrKacu13 - 2025-09-07 Okay, you have this error, because you can't return array in Pawn stock function. I made some changes and it works fine. Here's code: Code: stock Convert(seconds, stringTos[], size = sizeof(stringTos)) And this is example: Code: new buffer[128]; |