AlliedModders

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

sweden1996 12-04-2010 18:22

identifier
 
blockmaker_v4.01.sma<3547>error 001: expected: ";", but found "-identifier-"
blockmaker_v4.01.sma<3572>error 001: expected: ";", but found "-identifier-"
blockmaker_v4.01.sma<3595>error 001: expected: ";", but found "-identifier-"
blockmaker_v4.01.sma<3619>error 001: expected: ";", but found "-identifier-"
blockmaker_v4.01.sma<3965>error 001: expected: ";", but found "-identifier-"
blockmaker_v4.01.sma<4681>error 001: expected: ";", but found "-identifier-"






PHP Code:

public ShowLightMenu(id
{
    new 
MenuBody[512], szColor[3], access[3], lenkeys;
    
access = (get_user_flags(id) & BM_ADMIN_LEVEL "\w" "\d");
    
formatex(szColor3access
    
 <
3547>  len format(MenuBody511"\y%sLight Menu \r[Radius:  \y%i\r] - \yBy Juice"gszPrefixlight_properites[id][0]);
    
len += format(MenuBody[len], 511-len"^n\r1. %sRadius +"szColor);
    
len += format(MenuBody[len], 511-len"^n\r2. %sCreate Light"szColor);
    
len += format(MenuBody[len], 511-len"^n\r3. %sRadius -"szColor);
    
len += format(MenuBody[len], 511-len"^n\r4. %sDelete Light^n"szColor);
    
len += format(MenuBody[len], 511-len"^n\r5. \wColor Selection  \r[R: \y%i \r| G: \y%i \r| B: \y%i\r]^n"light_properites[id][1],  light_properites[id][2],light_properites[id][3]);
    
len += format(MenuBody[len], 511-len"^n\r6. %sSwitch Noclip"szColor);
    
len += format(MenuBody[len], 511-len"^n\r7. %sSwitch GodMode^n",szColor);
    
len += format(MenuBody[len], 511-len"^n\r9. \wOptions Menu^n");
    
len += format(MenuBody[len], 511-len"^n\r0. \wExit");
    
    
keys = ( 1<<1<<1<<);
    
    if( 
get_user_flags(id) & BM_ADMIN_LEVEL 
    
keys |= ( 1<<1<<1<<1<<1<<1<<);

    
show_menu(idkeysMenuBody, -1"LightMenu");





PHP Code:

public ShowOptionMenu(id
{
    new 
MenuBody[512], szColor[3], access[3], lenkeys;
    
access = (get_user_flags(id) & BM_ADMIN_LEVEL "\w" "\d");
    
formatex(szColor3access
    
  <
3572>  len format(MenuBody511"\y%sLight Options Menu"gszPrefix);
    
len += format(MenuBody[len], 511-len"^n\r1. %sLoad from file"szColor);
    
len += format(MenuBody[len], 511-len"^n\r2. %sDelete all lights"szColor);
    
len += format(MenuBody[len], 511-len"^n\r3. %sSave to file"szColor);
    
len += format(MenuBody[len], 511-len"^n\r4. %sEditing Amount: \y%i^n"szColorediting_value[id]);
    
len += format(MenuBody[len], 511-len"^n\r6. %sSwitch Noclip"szColor);
    
len += format(MenuBody[len], 511-len"^n\r7. %sSwitch GodMode^n"szColor);
    
len += format(MenuBody[len], 511-len"^n\r0. \wBack");
    
    
keys = ( 1<<);
    
    if(
get_user_flags(id) & BM_ADMIN_LEVEL)
    
keys |= ( 1<<1<<1<<1<<1<<1<<);
    
    
show_menu(idkeysMenuBody, -1"OptionMenu");









PHP Code:

public ShowColorMenuid 
{
    new 
MenuBody[512], szColor[3], access[3], lenkeys;
    
access = (get_user_flags(id) & BM_ADMIN_LEVEL "\w" "\d");
    
formatex(szColor3access
    
  <
3595>  len format(MenuBody511"\y%sColor Selection Menu^n\r[R: \y%i \r| G: \y%i \r| B: \y%i\r]"gszPrefixlight_properites[id][1], light_properites[id][2],light_properites[id][3]);
    
len += format(MenuBody[len], 511-len"^n\r1. %sRed +"szColor);
    
len += format(MenuBody[len], 511-len"^n\r2. %sRed -"szColor);
    
len += format(MenuBody[len], 511-len"^n\r3. %sGreen +"szColor);
    
len += format(MenuBody[len], 511-len"^n\r4. %sGreen -"szColor);
    
len += format(MenuBody[len], 511-len"^n\r5. %sBlue +"szColor);
    
len += format(MenuBody[len], 511-len"^n\r6. %sBlue -^n"szColor);
    
len += format(MenuBody[len], 511-len"^n\r9. \wColor Templates^n");
    
len += format(MenuBody[len], 511-len"^n\r0. \wBack");
    
    
keys = ( 1<<1<<);
    
    if(
get_user_flags(id) & BM_ADMIN_LEVEL)
    
keys |= ( 1<<1<<1<<1<<1<<1<<);

    
show_menuidkeysMenuBody, -1"ColorMenu" );






PHP Code:

public ShowTemplatesMenuid 
{
    new 
MenuBody[512], szColor[3], access[3], lenkeys;
    
access = (get_user_flags(id) & BM_ADMIN_LEVEL "\w" "\d");
    
formatex(szColor3access
    
   <
3619len format(MenuBody511"\y%sChoose Color Template:"gszPrefix);
    
len += format(MenuBody[len], 511-len"^n\r1. %sWhite"szColor);
    
len += format(MenuBody[len], 511-len"^n\r2. %sRed"szColor);
    
len += format(MenuBody[len], 511-len"^n\r3. %sGreen"szColor);
    
len += format(MenuBody[len], 511-len"^n\r4. %sBlue"szColor);
    
len += format(MenuBody[len], 511-len"^n\r5. %sAqua"szColor);
    
len += format(MenuBody[len], 511-len"^n\r6. %sYellow"szColor);
    
len += format(MenuBody[len], 511-len"^n\r7. %sOrange"szColor);
    
len += format(MenuBody[len], 511-len"^n\r8. %sPink^n"szColor);
    
len += format(MenuBody[len], 511-len"^n\r0. \wBack");
    
    
keys = ( 1<<);
    
    if(
get_user_flags(id) & BM_ADMIN_LEVEL)
    
keys |= ( 1<<1<<1<<1<<1<<1<<1<<1<<);

    
show_menuidkeysMenuBody, -1"TemplatesMenu" );








PHP Code:

public handleLightMenuidkey )
{
    new 
szName[33];
    
get_user_name(idszName32);
    switch(
key 1)
    {
        case 
1:
        {
            
light_properites[id][0] += editing_value[id];
            if(
light_properites[id][0] > 40)
            {
                
light_properites[id][0] = 40;
            }
           
ShowLightMenuid );
        }
        case 
2:
        {
            
CreateLightAimingid )
      <
3965>      ShowLightMenuid );
        }
        case 
3:
        {
            
light_properites[id][0] -= editing_value[id];
            if(
light_properites[id][0] <= 0)
            {
                
light_properites[id][0] = 5;
            }
            
ShowLightMenuid );
        }
        case 
4:
        {
            
DeleteLight(id);
            
ShowLightMenu(id); 





PHP Code:

CreateLightAimingid )
{
    new 
origin], Float:vOrigin];
    new 
Float:flCrosshairPitch get_pdata_floatid506 // m_flCrosshairPitch = 506;
  
<4681>  get_user_originidorigin);
    
IVecFVecoriginvOrigin );
    if(
0.0 <= flCrosshairPitch <= 100.0)
    {
        
vOrigin] -= gLightMaxY];
    }
    else     
vOrigin] += gLightMaxY];
    
    new 
iRadius light_properites[id][0];
    new 
iR light_properites[id][1];
    new 
iG light_properites[id][2];
    new 
iB light_properites[id][3];
        
    
CreateLightvOriginiRadiusiRiGiB );



fysiks 12-04-2010 18:28

Re: identifier
 
You probably forgot to close a bracket or brace. Make sure every opening bracket has a closing bracket and every opening brace has a closing brace. (Note: I did not look at your code).

sweden1996 12-04-2010 18:43

Re: identifier
 
what do you mean

drekes 12-04-2010 18:50

Re: identifier
 
On top of the code you will see something like this:
PHP Code:

#pragma semicolon 1 

Comment that and try again.

fysiks 12-04-2010 19:39

Re: identifier
 
Quote:

Originally Posted by drekes (Post 1363304)
On top of the code you will see something like this:
PHP Code:

#pragma semicolon 1 

Comment that and try again.

I think you are correct. My assumption is probably incorrect.

ConnorMcLeod 12-04-2010 19:45

Re: identifier
 
Line 3745 you forgot to end the line with semicolon.

sweden1996 12-05-2010 05:20

Re: identifier
 
But how do i fix it? and Line 3745 is not in the codes

drekes 12-05-2010 06:50

Re: identifier
 
Quote:

Originally Posted by sweden1996 (Post 1363559)
But how do i fix it? and Line 3745 is not in the codes

You could put a semicolon on the end on like ConnorMcLeod said, or comment the #pragma semicolon 1 on top of the plugin should do the trick too.


All times are GMT -4. The time now is 11:22.

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