Zeex Compiler | new version = error 035: argument type mismatch
#1

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:
Код:
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
Problem variables are - caption, info, button1, button2.

Using CallLocalFunction will crash the server.

Do you know how to solve it?

Happy New Year
Reply
#2

Quote:
Originally Posted by ******
Посмотреть сообщение
`static` and `const` are not the same thing, the compiler wants the latter, not the former.

Get the updated SA:MP includes, they are const corrected.
I updated SA:MP to newer version from http://www.sa-mp.com/download.php, but the problem still exists

Into my a_samp.inc i have this line:
Код:
native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
P.S. Sorry, i had a typo in first post.
Quote:

The problem, that this version "wants" me to use static string variables, if i don't change it.

was rewrited to
Quote:

The problem, that this version "wants" me to use const string variables, if i don't change it.

Reply
#3

Quote:
Originally Posted by ******
Посмотреть сообщение
Thank you very much for your fast answer.
It's alright now
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)