Raised This Month: $ Target: $400
 0% 

Anubis Again


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Extremeone
Senior Member
Join Date: Jan 2005
Old 02-23-2005 , 12:21   Anubis Again
Reply With Quote #1

Ok after Working for hours im down to 6 new errors and i need some help
Code:
#include <amxmodx> #include <engine> #include <fun> #include <Vexd_Utilities> #include <superheromod> new bool:gHasAnubisPowers[SH_MAXSLOTS+1] new gmsgSayText //---------------------------------------------------------------------------------------------- public plugin_init() {     register_plugin("SUPERHERO Anubis","1.17.5","AssKicR/JTP10181")     register_cvar("anibus_showdamage", "1")         register_event("ResetHUD","anubis_newround","b")         register_srvcmd("anubis_init", "anubis_init")         register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")         register_clcmd("say", "handle_say")     register_clcmd("say_team", "handle_say")         gmsgSayText = get_user_msgid("SayText") } //---------------------------------------------------------------------------------------------- public anubis_init() {     {         if (get_user_flags & ADMIN_BAN)  {             (gHasAnubisPowers [32]) = true     }     else     {             (gHasAnubisPowers [32]) = false     }     new temp[6]     read_argv(1,temp,5)     read_argv(2,temp,5) } //----------------------------------------------------------------------------------------------     new id = str_to_num(temp) public handle_say(id) {     new command[10],players[SH_MAXSLOTS]     new message[191],name[33], player_count     new teamname[5], sMessage[191]     read_argv(0, command, 16)     read_argv(1, message, 190)     if (equal(message,"") || equal(message,"[")) return PLUGIN_CONTINUE     new temp[6]     new id = str_to_num(temp)     new is_alive = is_user_alive(id)     new team = get_user_team(id)     new isSayTeam = equal(command, "say_team")     get_user_name(id, name, 33)     if (team == 1) copy(teamname,4,"(T)")     else if (team == 2)    copy(teamname,4,"(CT)")     format(sMessage,190, "%c[DN]%s%s%s :  %s^n", 2,  isSayTeam ? teamname : "", is_alive ? "*ALIVE*" : "*DEAD*", name, message)     get_players(players, player_count, "c")     for (new i = 0; i < player_count; i++) {         if (gHasAnubisPowers[players[i]] && is_user_connected(players[i])) {             if (is_user_alive(players[i]) && !is_alive || isSayTeam && team != get_user_team(players[i])) {                 message_begin(MSG_ONE,gmsgSayText,{0,0,0},players[i])                 write_byte(id)                 write_string(sMessage)                 message_end()             }         }     }     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public damage_msg(id) {         new aIndex = get_user_attacker(id)         new damage = read_data(2)         if ( is_user_alive(id))  {             set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 2.0, 0.02, 0.02, 74)             show_hudmessage(aIndex,"%i", damage)         }         if ( is_user_alive(id)) {             set_hudmessage(200, 0, 0, -1.0, 0.48, 2, 0.1, 2.0, 0.02, 0.02, 76)             show_hudmessage(id,"%i", damage)         }     }     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public client_connect(id) {    (gHasAnubisPowers[id]) = true } public client_disconnect(id) {    (gHasAnubisPowers[id]) = false } //----------------------------------------------------------------------------------------------
Code:
//// 1.sma
(35) : error 076: syntax error in the expression, or invalid function call
(38) : warning 217: loose indentation
(42) : warning 217: loose indentation
(47) : error 017: undefined symbol "temp"
(48) : warning 217: loose indentation
(48) : error 029: invalid expression, assumed zero
(48) : error 017: undefined symbol "handle_say"
(59) : warning 219: local variable "id" shadows a variable at a preceding level
(84) : warning 225: unreachable code
(84) : error 029: invalid expression, assumed zero
(84) : error 017: undefined symbol "damage_msg"
(98) : warning 217: loose indentation
// 6 Errors.
// Could not locate output file compiled\1.amx (compile failed).
Extremeone is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-23-2005 , 16:09  
Reply With Quote #2

you have to add these lines somewhere, then all you have to do is compile it with superheromod.inc and your ready to go...


Code:
new handle_say[30] new damage_msg[30]

oh, and add whatever you want them to be at default
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Extremeone
Senior Member
Join Date: Jan 2005
Old 02-23-2005 , 16:24  
Reply With Quote #3

nice try but that gives these errors
Code:
//// anubis.sma
(37) : error 076: syntax error in the expression, or invalid function call
(40) : warning 217: loose indentation
(44) : warning 217: loose indentation
(49) : error 017: undefined symbol "temp"
(50) : warning 217: loose indentation
(50) : error 029: invalid expression, assumed zero
(50) : error 012: invalid function call, not a valid address
(50) : warning 215: expression has no effect
(50) : error 001: expected token: ";", but found ")"
(50) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 6 Errors.
// Could not locate output file compiled\anubis.amx (compile failed).
//
// Compilation Time: 1.19 sec
// ----------------------------------------


heres my current one
Code:
#include <amxmodx> #include <Vexd_Utilities> #include <superheromod> new bool:gHasAnubisPowers[SH_MAXSLOTS+1] new gmsgSayText //---------------------------------------------------------------------------------------------- public plugin_init() {     register_plugin("SUPERHERO Anubis","1.17.5","AssKicR/JTP10181")     register_cvar("anibus_showdamage", "1")         register_event("ResetHUD","anubis_newround","b")         register_srvcmd("anubis_init", "anubis_init")         register_event("Damage", "damage_msg", "b", "2!0", "3=0", "4!0")         register_clcmd("say", "handle_say")     register_clcmd("say_team", "handle_say")         gmsgSayText = get_user_msgid("SayText") } //---------------------------------------------------------------------------------------------- public anubis_init() {     {         if (get_user_flags(32) & ADMIN_BAN)            (gHasAnubisPowers [32]) = true            else            (gHasAnubisPowers [32]) = false     }     new temp[6]     read_argv(1,temp,5)     read_argv(2,temp,5) } //---------------------------------------------------------------------------------------------- public handle_say(id) {     new command[10],players[SH_MAXSLOTS]     new message[191],name[33], player_count     new teamname[5], sMessage[191]     read_argv(0, command, 16)     read_argv(1, message, 190)     if (equal(message,"") || equal(message,"[")) return PLUGIN_CONTINUE     new temp[6]     new id = str_to_num(temp)     new is_alive = is_user_alive(id)     new team = get_user_team(id)     new isSayTeam = equal(command, "say_team")     get_user_name(id, name, 33)     if (team == 1) copy(teamname,4,"(T)")     else if (team == 2)    copy(teamname,4,"(CT)")     format(sMessage,190, "%c[DN]%s%s%s :  %s^n", 2,  isSayTeam ? teamname : "", is_alive ? "*ALIVE*" : "*DEAD*", name, message)     get_players(players, player_count, "c")     for (new i = 0; i < player_count; i++) {         if (gHasAnubisPowers[players[i]] && is_user_connected(players[i])) {             if (is_user_alive(players[i]) && !is_alive || isSayTeam && team != get_user_team(players[i])) {                 message_begin(MSG_ONE,gmsgSayText,{0,0,0},players[i])                 write_byte(id)                 write_string(sMessage)                 message_end()             }         }     }     return PLUGIN_CONTINUE } //---------------------------------------------------------------------------------------------- public damage_msg(id) {         new aIndex = get_user_attacker(id)         new damage = read_data(2)         if ( is_user_alive(id))  {             set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 2.0, 0.02, 0.02, 74)             show_hudmessage(aIndex,"%i", damage)         }         if ( is_user_alive(id)) {             set_hudmessage(200, 0, 0, -1.0, 0.48, 2, 0.1, 2.0, 0.02, 0.02, 76)             show_hudmessage(id,"%i", damage)         } }

gives one warning and does NOTHING in-game

Code:
(53) : warning 219: local variable "id" shadows a variable at a preceding level
Extremeone is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-23-2005 , 16:26  
Reply With Quote #4

:/ the one i posted didnt give me any errors except to compile it with the superheromod.inc

heres mine... you can try it...
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Extremeone
Senior Member
Join Date: Jan 2005
Old 02-23-2005 , 16:29  
Reply With Quote #5

of course it didnt it aborted b4 compiling cause you didnt have sheromod.inc
Extremeone is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-23-2005 , 16:35  
Reply With Quote #6

ah... it just gave me the error superheromod not found...

i thought it went through and did it all and then told me that..

im still new at this...
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Reply


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 14:08.


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