AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Tag Mismatched (https://forums.alliedmods.net/showthread.php?t=131001)

shuttle_wave 06-30-2010 03:38

Tag Mismatched
 
PHP Code:


// LastRequest Menu
public LastRequest(id)
{    
    
// Show Choosing Message
    
RemoveChoosing(id);
    
set_task(0.1"task_DisplayChoosing"id);
    
    static 
iLenszMenu[400], iKeysiNum;
    
    
iKeys MENU_KEY_0;
    
    
iLen formatex(szMenusizeof(szMenu) - 1"\yLastRequest Menu:^n\rby Shuttle_Wave^n^n");
    
    for(
iNum 0iNum LrGamesiNum++)
    {
        
iKeys |= ( 1<<iNum );
        
iLen += formatex(szMenu[iLen], sizeof(szMenu) - iLen"\r%i. \w%s^n"iNum+1g_szLastRequestGames[iNum]);
    }
    
    
iLen += formatex(szMenu[iLen], sizeof(szMenu) - iLen"^n\r0. \wExit");
    
    
show_menu(idiKeysszMenu, -1"LastRequest Menu");
    
    return 
PLUGIN_HANDLED;


i get
C:\Documents and Settings\Jonathon Leng\Desktop\JailBreak.sma(417) : warning: tag mismatch
C:\Documents and Settings\Jonathon Leng\Desktop\JailBreak.sma(420) : warning: tag mismatch

this is line 417
PHP Code:

for(iNum 0iNum LrGamesiNum++) 

this is line 420
PHP Code:

iLen += formatex(szMenu[iLen], sizeof(szMenu) - iLen"\r%i. \w%s^n"iNum+1g_szLastRequestGames[iNum]); 


SnoW 06-30-2010 06:12

Re: Tag Mismatched
 
LrGames and g_szLastRequestGames

shuttle_wave 06-30-2010 21:47

Re: Tag Mismatched
 
Quote:

Originally Posted by SnoW (Post 1224436)
LrGames and g_szLastRequestGames

I dont get it

wrecked_ 06-30-2010 22:38

Re: Tag Mismatched
 
Show us your declarations for those two variables.

shuttle_wave 07-01-2010 01:28

Re: Tag Mismatched
 
PHP Code:

new const g_szLastRequestGames[LrGames][] =
{
    
"Knife Fight",
    
"Shot 4 Shot",
    
"Grenade Battle",
    
"Shooting Frenzy",
    
"Shotty Madness",
    
"Scoutz Supprise"
}; 

PHP Code:

new LrGames:Game


Emp` 07-01-2010 02:17

Re: Tag Mismatched
 
PHP Code:

for(iNum 0iNum _:LrGamesiNum++) 

PHP Code:

iLen += formatex(szMenu[iLen], sizeof(szMenu) - iLen"\r%i. \w%s^n"iNum+1g_szLastRequestGames[LrGames:iNum]); 


fysiks 07-01-2010 18:13

Re: Tag Mismatched
 
So, what is LrGames defined as? I'm assuming it's an enum but I wouldn't think you could use it as an integer in the for loop.

Emp` 07-01-2010 19:42

Re: Tag Mismatched
 
Quote:

Originally Posted by fysiks (Post 1225935)
So, what is LrGames defined as? I'm assuming it's an enum but I wouldn't think you could use it as an integer in the for loop.

IIRC it takes the value that comes next.

Ex.:
Code:

enum Blah
{
  Blah_1,
  Blah_2,
}

Blah == 2

Code:

enum Blah
{
  Blah_1 = -1,
  Blah_2,
  Blah_3,
  Blah_4,
}

Blah == 3


shuttle_wave 07-02-2010 03:22

Re: Tag Mismatched
 
Quote:

Originally Posted by fysiks (Post 1225935)
So, what is LrGames defined as? I'm assuming it's an enum but I wouldn't think you could use it as an integer in the for loop.

Yep it is a enum

PHP Code:

enum LrGames
{
    
LR_KNIFE,
    
LR_SHOT,
    
LR_NADE,
    
LR_FRENZY,
    
LR_SHOTTY,
    
LR_SCOUT




All times are GMT -4. The time now is 14:48.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.