PDA

View Full Version : callbacks.pwn(1213) : warning 213: tag mismatch callbacks.pwn(1217) : warning 213: tag mismatch callbacks.pwn(1221) : wa


Dawkin
30/07/2018, 11:22 AM
callbacks.pwn(1213) : warning 213: tag mismatch
callbacks.pwn(1217) : warning 213: tag mismatch
callbacks.pwn(1221) : warning 213: tag mismatch
callbacks.pwn(1225) : warning 213: tag mismatch
callbacks.pwn(1229) : warning 213: tag mismatch
callbacks.pwn(1242) : error 001: expected token: "]", but found ")"
callbacks.pwn(1243) : error 001: expected token: "]", but found ")"
callbacks.pwn(1244) : error 001: expected token: "]", but found ")"
callbacks.pwn(1245) : error 001: expected token: "]", but found ")"
callbacks.pwn(1246) : error 001: expected token: "]", but found ")"
callbacks.pwn(1247) : error 001: expected token: "]", but found ")"
callbacks.pwn(1248) : error 001: expected token: "]", but found ")"
callbacks.pwn(1249) : error 001: expected token: "]", but found ")"
callbacks.pwn(1250) : error 001: expected token: "]", but found ")"
callbacks.pwn(1251) : error 001: expected token: "]", but found ")"
callbacks.pwn(1252) : error 001: expected token: "]", but found ")"
callbacks.pwn(1253) : error 001: expected token: "]", but found ")"

This is my code https://pastebin.com/raw/vE8SHR1b
Ctrl F: line 1213 and line 1253

https://pastebin.com/raw/bCNRnsKd

EDIT:

Now only bug
./includes/callbacks.pwn(1211) : warning 213: tag mismatch
./includes/callbacks.pwn(1215) : warning 213: tag mismatch
./includes/callbacks.pwn(1219) : warning 213: tag mismatch
./includes/callbacks.pwn(1223) : warning 213: tag mismatch
./includes/callbacks.pwn(1227) : warning 213: tag mismatch
from
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == GUI_HuongDan[playerid][1]) // nhan cong viec
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][10]);
}
else if(clickedid == GUI_HuongDan[playerid][2])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][6]);
}
else if(clickedid == GUI_HuongDan[playerid][3])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][9]);
}
else if(clickedid == GUI_HuongDan[playerid][5])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][11]);
}
else if(clickedid == GUI_HuongDan[playerid][13])
{

jlalt
30/07/2018, 11:32 AM
pretty sure you had to use OnPlayerClickPlayerTextDraw (http://wiki.sa-mp.com/wiki/OnPlayerClickPlayerTextDraw) callback.
about the errors I really couldn't find anything which would make them, are you missing bracket or smth?

Dutheil
30/07/2018, 11:56 AM
Can you show us the declaration of GUI_HuongDan ?

Dawkin
30/07/2018, 11:58 AM
Can you show us the declaration of GUI_HuongDan ?

https://pastebin.com/raw/bCNRnsKd

Florin48
30/07/2018, 12:01 PM
at this you can use for(..


else if(clickedid == GUI_HuongDan[playerid][13])
{
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][0]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][1]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][2]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][3]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][4]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][5]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][6]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][7]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][8]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][9]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][10]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][11]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][12]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][13]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][14]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][15]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][16]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][17]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][18]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][19]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][20]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][21]);
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][22]); // line 1253
}


else if(clickedid == GUI_HuongDan[playerid][13])
{
for(new i = 0; i < 23; i++) {
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][i]);
}
}

Dutheil
30/07/2018, 12:02 PM
Ok you have to use the OnPlayerClickPlayerTextDraw (http://wiki.sa-mp.com/wiki/OnPlayerClickPlayerTextDraw) callback

Dawkin
30/07/2018, 12:02 PM
Can you show us the declaration of GUI_HuongDan ?

at this you can use for(..

Thank you :D I'm noob

Dawkin
30/07/2018, 12:06 PM
Ok you have to use the OnPlayerClickPlayerTextDraw (http://wiki.sa-mp.com/wiki/OnPlayerClickPlayerTextDraw) callback

I dont know what wrong here
https://pastebin.com/H3NTdzjx

Dutheil
30/07/2018, 12:07 PM
You don't use the good callback, look this code :
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(_:playertextid != INVALID_TEXT_DRAW)
{
if(playertextid == GUI_HuongDan[playerid][1]) // line 1213
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][10]);
}
else if(playertextid == GUI_HuongDan[playerid][2])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][6]);
}
else if(playertextid == GUI_HuongDan[playerid][3])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][9]);
}
else if(playertextid == GUI_HuongDan[playerid][5])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][11]);
}
else if(playertextid == GUI_HuongDan[playerid][13])
{
for(new i = 0; i < 23; i++)
{
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][i]);
}
}
}
}

Dawkin
30/07/2018, 12:12 PM
Ok you have to use the OnPlayerClickPlayerTextDraw (http://wiki.sa-mp.com/wiki/OnPlayerClickPlayerTextDraw) callback

You don't use the good callback, look this code :
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(_:playertextid != INVALID_TEXT_DRAW)
{
if(playertextid == GUI_HuongDan[playerid][1]) // line 1213
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][10]);
}
else if(playertextid == GUI_HuongDan[playerid][2])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][6]);
}
else if(playertextid == GUI_HuongDan[playerid][3])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][9]);
}
else if(playertextid == GUI_HuongDan[playerid][5])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][11]);
}
else if(playertextid == GUI_HuongDan[playerid][13])
{
for(new i = 0; i < 23; i++)
{
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][i]);
}
}
}
}

Do you have ******** or Discord?
When I /guihuongdan TextDraw will show, but my mouse not show to click TextDraw
How to show both, TextDraw + mouse to click
Sorry my English pretty weak

Florin48
30/07/2018, 12:15 PM
you need SelectTextDraw(playerid, 0xFFFFFFFF);
i think

Dawkin
30/07/2018, 12:23 PM
You don't use the good callback, look this code :
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(_:playertextid != INVALID_TEXT_DRAW)
{
if(playertextid == GUI_HuongDan[playerid][1]) // line 1213
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][10]);
}
else if(playertextid == GUI_HuongDan[playerid][2])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][6]);
}
else if(playertextid == GUI_HuongDan[playerid][3])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][9]);
}
else if(playertextid == GUI_HuongDan[playerid][5])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][11]);
}
else if(playertextid == GUI_HuongDan[playerid][13])
{
for(new i = 0; i < 23; i++)
{
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][i]);
}
}
}
}

error 025: function heading differs from prototype ???

Florin48
30/07/2018, 12:28 PM
public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(playertextid == GUI_HuongDan[playerid][1]) // line 1213
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][10]);
}
else if(playertextid == GUI_HuongDan[playerid][2])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][6]);
}
else if(playertextid == GUI_HuongDan[playerid][3])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][9]);
}
else if(playertextid == GUI_HuongDan[playerid][5])
{
PlayerTextDrawShow(playerid, GUI_HuongDan[playerid][11]);
}
else if(playertextid == GUI_HuongDan[playerid][13])
{
for(new i = 0; i < 23; i++)
{
PlayerTextDrawDestroy(playerid, GUI_HuongDan[playerid][i]);
}
}
}

try now

Dawkin
30/07/2018, 12:47 PM
Ok textdraw already ok
But how to use TextDrawSetSelectable or PlayerTextDrawSetSelectable ?
To set clickable GUI_HuongDan[playerid][1]

Rufio
30/07/2018, 12:58 PM
http://wiki.sa-mp.com/wiki/PlayerTextDrawSetSelectable