SA-MP Forums Archive
Fix this error please. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Fix this error please. (/showthread.php?tid=557754)



Fix this error please. - iCurse - 14.01.2015

Here, What is this error and how can i fix it?

Код:
C:\Users\Hadjinoor-PC\Desktop\SAMP Community Training GM\gamemodes\DM.pwn(387) : warning 213: tag mismatch



Re: Fix this error please. - ahmedkoki - 15.01.2015

Post code please


Re: Fix this error please. - Sew_Sumi - 15.01.2015

Quote:
Originally Posted by iCurse
Посмотреть сообщение
Here, What is this error and how can i fix it?

Код:
C:\Users\Hadjinoor-PC\Desktop\SAMP Community Training GM\gamemodes\DM.pwn(387) : warning 213: tag mismatch
Line 387 has a function that's being called with the incorrect parameters.

Paste lines 385-389.


Check this for further info... Using the incorrect float/int/string combos will cause this.

https://sampforum.blast.hk/showthread.php?tid=369714


Re: Fix this error please. - Schneider - 15.01.2015

This means you're passing a wrong type of variable in a function on line 387.
If a certain function requires a string as one of its parameters, you can't pass an integer or float.

Likewise if a function requires an integer, you can't pass a string or float. That's what's causing the problem.

Quote:

Line 387 has a function that's being called with the incorrect number of parameters.

No it does not. That would give you warning 202: number of arguments does not match definition


Re: Fix this error please. - Sew_Sumi - 15.01.2015

Quote:
Originally Posted by Schneider
Посмотреть сообщение
No it does not. That would give you warning 202: number of arguments does not match definition
That's why I edited the reply, also enclosing a similar thread with that same statement that you'd made, before you posted that edit adding in the misquote.


Re: Fix this error please. - iCurse - 15.01.2015

I think here is where the problem is happening

pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    if(playerid == RegisterPassword[playerid])
        ShowPlayerDialog(playerid, dialog_register_1, DIALOG_STYLE_PASSWORD, "Please Enter a Password", "Please provide a strong password below.", "Continue", "Cancel");
    return 1;
}



Re: Fix this error please. - Sew_Sumi - 15.01.2015

Is that lines 385-389?


Re: Fix this error please. - iCurse - 15.01.2015

385 - 387


Respuesta: Fix this error please. - JuanStone - 15.01.2015

Show me the line of the error.

Edit:

How do you guarantee that i declared variable correctly ?.

pawn Код:
new PlayerText:RegisterPassword[MAX_PLAYERS];//

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
    if(playertextid == RegisterPassword[playerid])
    {
        ShowPlayerDialog(playerid, dialog_register_1, DIALOG_STYLE_PASSWORD, "Please Enter A Password", "Please provide a strong password below:", "Continue", "Cancel");
    }
    return true;
}



Re: Fix this error please. - iCurse - 15.01.2015

Hmm, sir i transferred the the to another thingy.

Here but it occured another problem.

Код:
DM.pwn(388) : error 025: function heading differs from prototype
DM.pwn(389) : warning 213: tag mismatch
The script.

pawn Код:
public OnPlayerClickPlayerTextDraw(playerid, playertext:playertextid){
    if(playertextid == RegisterPassword[playerid]){
        ShowPlayerDialog(playerid, dialog_register_1, DIALOG_STYLE_PASSWORD, "Please Enter A Password", "Please provide a strong password below:", "Continue", "Cancel");
    }
    return 1;
}
It was according to here.

https://www.youtube.com/watch?v=ARsmM0PzM38