Jump to content
  • 0

pomoc warning 213: tag mismatch


MegaTheVova

Dotaz

Zdarec.. mam takovy problem nevim jak se zbavit tohohle warningu.. byl bych moc rad kdyby jste mi pomohli diky :)

Warning:

​C:\Users\MegaTheVova\Desktop\Různé\server\Drift.pwn(2079) : warning 213: tag mismatch

Prikaz:

if(strcmp("/gotoon", cmdtext, true, 10) == 0)
{
if(GOTO[playerid] == false)
{
SendClientMessage(playerid, COLOR_RED, "{FFFFFF}[{3399FF}Aw{FFFFFF}]{3399FF}:{FFFFFF} You have enabled goto.");
GOTO[playerid] = 1;
  }
   else
   {
   if(GOTO[playerid] == true) return SendClientMessage(playerid, COLOR_GREEN, "{FFFFFF}[{3399FF}Aw{FFFFFF}]{3399FF}:{FFFFFF} At the moment you have enabled goto.");
return 1;
  }
}
Edited by MegaTheVova
Link to comment
Share on other sites

6 odpovědí na tuto otázku

Recommended Posts

  • 0

A co takhle definici GOTO? Nejspíš tam máš 

"bool:GOTO[MAX_PLAYERS]"

, tudíž 

GOTO[playerid] = true

a tohle

if(GOTO[playerid] == true)

je tam pak zbytečné.

Link to comment
Share on other sites

  • 0

A co takhle definici GOTO? Nejspíš tam máš 

"bool:GOTO[MAX_PLAYERS]"

, tudíž 

GOTO[playerid] = true

a tohle

if(GOTO[playerid] == true)

je tam pak zbytečné.

definici tam mam :) diky

Edited by MegaTheVova
Link to comment
Share on other sites

  • 0
  • Globální moderátor

else

{

if ...

 

se nepoužívá takto..

použij 

 

else if(...)

{

 ...

}

 

A do bool proměné dosazuj true/false a ne 1/0 Ve výsledku je to jedno, ale pro přehled lepší a myslím že ten warn je kvůli tomu ...

Link to comment
Share on other sites

  • 0

if(strcmp("/gotoon",cmdtext,true) == 0)
{
if(GOTO[playerid] == false)
{
SendClientMessage(playerid,COLOR_RED,"{FFFFFF}[{3399FF}Aw{FFFFFF}]{3399FF}:{FFFFFF} You have enabled goto.");
GOTO[playerid] = true;
}
else SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}[{3399FF}Aw{FFFFFF}]{3399FF}:{FFFFFF} At the moment you have enabled goto.");
return 1;
}
Link to comment
Share on other sites

  • 0

if(strcmp("/gotoon",cmdtext,true) == 0)
{
    if(GOTO[playerid]) return SendClientMessage(playerid,COLOR_GREEN,"{FFFFFF}[{3399FF}Aw{FFFFFF}]{3399FF}:{FFFFFF} At the moment you have enabled goto.");
    GOTO[playerid] = true;
    return SendClientMessage(playerid,COLOR_RED,"{FFFFFF}[{3399FF}Aw{FFFFFF}]{3399FF}:{FFFFFF} You have enabled goto.");
}
Edited by Lukasz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...