Raised This Month: $ Target: $400
 0% 

Problem with compiling


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
KyleD
Member
Join Date: Mar 2005
Location: Anchorage, AK
Old 04-18-2005 , 01:14  
Reply With Quote #3

Well now errors come up.

Here is updated code.

Code:
// Credits  john-SPARTAN-117 #include <amxmodx> #include <amxmisc> #include <cstrike> #include <fun> #define class_default 0 #define class_human 1 #define class_covenant 2 #define MAXCLASSES 3 #define NUM_OF_LEVELS 5 new g_playerclass[33] new g_playerxp[33] new g_playerlevel[33] new const CLASSES[MAXCLASSES][] = {     "Default",     "Human",     "Covenant" } new const LEVELS[NUM_OF_LEVELS] = {     100, // Level 1     200, // Level 2     400, // Level 3     800, // Level 4     1600, // Level 5 } new msgtext public plugin_init() {     register_plugin("HaloMod","1.0","KyleD")     register_cvar("sv_halomod","1")     register_cvar("xp_for_kill","50")     register_event("DeathMsg","event_deathmsg","a")     register_event("ResetHUD", "ResetHud", "b")     register_menucmd(register_menuid("menu_ChooseClass"),1023,"do_chooseclass");     msgtext = get_user_msgid("StatusText")     register_clcmd("say /changeclass","changeclass")     register_clcmd("say_team /changeclass","changeclass") } public changeclass(id) {     new menu[256]     format(menu,255,"HaloMod: Choose Class^n^n1. Human^n2. Covenant^n^n3. Exit")     show_menu(id,(1<<0)|(1<<1),menu)     return PLUGIN_CONTINUE; } public do_chooseclass(id,key) {     switch(key) {         case 0: {             if(g_playerclass[id] == class_human) {                 client_print(id,print_chat,"[HaloMod] You're already a Human. Select a different class.")                 changeclass(id)                 return PLUGIN_HANDLED;             }             if (g_playerclass[id] = class_human) {                 client_print(id,print_chat,"[HaloMod] You are now Human.")             }         case 1: {             if(g_playerclass[id] == class_covenant) {                 client_print(id,print_chat,"[HaloMod] You're already a Covenant. Select a different class.")                 changeclass(id)                 return PLUGIN_HANDLED;             }                 if(g_playerclass[id] = class_covenant) {                 client_print(id,print_chat,"[HaloMod] You are now Covenant.                 }                 ShowHud(id)                 return PLUGIN_HANDLED;             }         }     } } public ResetHud(id) {     if(get_cvar_num("sv_halomod") == 0) {         client_print(id,print_chat,"[HaloMod] Is currently off")         return PLUGIN_HANDLED;     }     if(g_playerclass[id] == class_default) {         changeclass(id)         return PLUGIN_HANDLED;     }     return PLUGIN_HANDLED; } public event_deathmsg() {     if(get_cvar_num("sv_halomod") == 0) {         return PLUGIN_HANDLED;     }     new attacker = read_data(1)     if(g_playerclass[attacker] == class_default) {         return PLUGIN_HANDLED;     }     if(g_playerlevel[attacker] == 5) {         return PLUGIN_HANDLED;     }     g_playerxp[attacker] += get_cvar_num("xp_for_kill")     if (g_playerxp[attacker] >= LEVELS[g_playerlevel[attacker]]) {         g_playerlevel[attacker] += 1         client_print(attacker,print_chat,"[HaloMod] Congratulations! You are now level %i!",g_playerlevel[attacker])         ShowHUD(attacker)     }     ShowHUD(attacker)     return PLUGIN_CONTINUE; } public ShowHUD(id) {     new HUD[61]     format(HUD,60,"[%s]Level: %i XP: %i",CLASSES[g_playerclass[id]],g_playerlevel[id],g_playerxp[id])     message_begin(MSG_ONE,msgtext,{0,0,0},id)     write_byte(0)     write_string(HUD)     message_end()     return PLUGIN_HANDLED; }

4 errors..
/home/groups/amxmodx/tmp/phpwfvD7v.sma(63) : warning 211: possibly unintended assignment
/home/groups/amxmodx/tmp/phpwfvD7v.sma(66) : warning 217: loose indentation
/home/groups/amxmodx/tmp/phpwfvD7v.sma(66) : error 014: invalid statement; not in switch
/home/groups/amxmodx/tmp/phpwfvD7v.sma(66) : warning 215: expression has no effect
/home/groups/amxmodx/tmp/phpwfvD7v.sma(66) : error 001: expected token: ";", but found ":"
/home/groups/amxmodx/tmp/phpwfvD7v.sma(66) : error 029: invalid expression, assumed zero
/home/groups/amxmodx/tmp/phpwfvD7v.sma(66) : fatal error 107: too many error messages on one line
__________________
KyleD is offline
Send a message via MSN to KyleD
 



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 10:03.


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