Raised This Month: $ Target: $400
 0% 

Code Gets Error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
deadman909
Veteran Member
Join Date: Oct 2008
Old 07-14-2011 , 04:12   Code Gets Error
Reply With Quote #1

Can someone tell me what is wrong with this code I keep getting errors. There at the bottom.

Code:
public Choose(id)
{
        if(get_user_team(id) = 1)
        {
                new menuBody[512]
                add(menuBody, 511, "\yChoose your player:^n^n")
                add(menuBody, 511, "\w1. Army^n")
                add(menuBody, 511, "\w2. Air Force^n")
                add(menuBody, 511, "\w3. Navy^n")
                add(menuBody, 511, "\w4. Marine^n")
                show_menu(id, Keysplayermenu, menuBody, -1, "playermenu")
                client_print(id, print_chat, "Choose your character")
                //CT Team Menu
        }
        if(get_user_team(id) = 2)
        {
                new menuBody[512]
                add(menuBody, 511, "\yChoose your DBZ Character:^n^n")
                add(menuBody, 511, "\w1. Terror^n")
                add(menuBody, 511, "\w2. Uslam^n")
                add(menuBody, 511, "\w3. Afgane^n")
                add(menuBody, 511, "\w4. Tuclam^n")
                show_menu(id, TKeysplayermenu, menuBody, -1, "Tplayermenu")
                client_print(id, print_chat, "Choose your character")
        }
        return PLUGIN_HANDLED
}
Quote:
//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// Players.sma
// C:\Users\Account\Desktop\compiler\Players.sma (1052) : warning 211: poss
ibly unintended assignment
// C:\Users\Account\Desktop\compiler\Players.sma (1052) : error 022: must b
e lvalue (non-constant)
// C:\Users\Account\Desktop\compiler\Players.sma (1052) : warning 215: expr
ession has no effect
// C:\Users\Account\Desktop\compiler\Players.sma (1052) : error 001: expect
ed token: ";", but found ")"
// C:\Users\DeadMan\Desktop\compiler\Players.sma (1052) : error 029: invali
d expression, assumed zero
// C:\Users\Account\Desktop\compiler\Players.sma (1052) : fatal error 107:
too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file C:\Users\Account\Desktop\compiler\compiled\Pl ayers.amx (compile failed).
//
// Compilation Time: 0.58 sec
// ----------------------------------------

Press enter to exit ...
__________________

deadman909 is offline
Send a message via MSN to deadman909 Send a message via Yahoo to deadman909
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:10.


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