03.01.2019, 12:32
Hello everybody.
While using Zeex Compiler v.3.10.9, i have error (error 035: argument type mismatch).
This happend, when i tried to hook native function ShowPlayerDialog.
The problem, that this version "wants" me to use const string variables, if i don't change it.
Proof in (https://github.com/pawn-lang/compile...st-Correctness).
This is my code:
Problem variables are - caption, info, button1, button2.
Using CallLocalFunction will crash the server.
Do you know how to solve it?
Happy New Year
While using Zeex Compiler v.3.10.9, i have error (error 035: argument type mismatch).
This happend, when i tried to hook native function ShowPlayerDialog.
The problem, that this version "wants" me to use const string variables, if i don't change it.
Proof in (https://github.com/pawn-lang/compile...st-Correctness).
This is my code:
Код:
stock _ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[]) { if(GetPVarInt(playerid,"DialogID") == 0) { ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2); SetPVarInt(playerid,"DialogID",dialogid); SetPVarInt(playerid,"DialogButton2",strlen(button2) > 0 ? 1 : 0); } return 1; } #if defined _ALS_ShowPlayerDialog #undef ShowPlayerDialog #else #define _ALS_ShowPlayerDialog #endif #define ShowPlayerDialog _ShowPlayerDialog
Using CallLocalFunction will crash the server.
Do you know how to solve it?
Happy New Year