Raised This Month: $51 Target: $400
 12% 

got errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mage
Senior Member
Join Date: Sep 2005
Old 08-27-2005 , 04:03   got errors
Reply With Quote #1

can any one help me fix my first hero.

here the code is:

Code:
//destroyer /* CVARS - copy and paste cvars to schonfig.cfg //destroyer dest_level 11             //level of destroyer dest_health 3000             //health of destroyer dest_armor 1000             //armor of destroyer dest_knifespeed 290    //how fast he can hit with his cyber knife dest_healpoints 30.0             //how much health destroyer regain              dest_gravity 0.40             //the gravity of destroyer              dest_speed 900             //how fast destroyer is dest_knifemulti 99.9     //damage multiplier for his cyber knife              dest_hppercent 25.0             //how much his electro tentacles sucks of health out of the victim */ #include <amxmod> #include <vexd_utilities> #include <superheromod> //global variables new gHeroName[]="Destroyer" new bool:gHasDestroyerPowers[SH_MAXSLOTS+1] new gPlayerLevels[SH_MAXSLOTS+1] new gPlayerMaxHealth[SH_MAXSLOTS+1] new Float:gMultiplier new gHealPoints //------------------------------------------------------------------------------ public_init() {     //plugin info     register_plugin("SUPERHERO Destroyer","1.0","spyhunter")           //DO NOT EDIT THESE CVARS. USE shconfig.cfg     register_cvar("dest_level", "11")     register_cvar("dest_health", "3000")         register_cvar("dest_armor", "1000")         register_cvar("dest_knifespeed", "290")         register_cvar("dest_healpoints", "30.0")         register_cvar("dest_gravity", "0.40")         register_cvar("dest_speed", "900")         register_cvar("dest_knifemulti", "99.9")         register_cvar("dest_hppercent", "25.0")                   //FIRE THIS EVENT TO CREATE THIS HERO         shCreateHero(gHeroName, "Destroyer Powers", "Werewolf and wampire fuzed together", false, "dest_level")                   //REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS         register_srvcmd("dest_init", "dest_init")         shRegHeroInit(gHeroName, "dest_init")                   shSetMaxHealth(gHeroName, "dest_health" )        shSetMinGravity(gHeroName, "dest_gravity" )        shSetMaxArmor(gHeroName, "dest_armor" )        shSetMaxSpeed(gHeroName, "dest_speed", "[0]" )                 //INIT         register_srvcmd("dest_init", "dest_init")         shRegHeroInit(gHeroName,"dest_init")                   //LEVELS         register_srvcmd("dest_levels", "dest_levels")         shRegLevels(gHeroName,"dest_levels")                   //ENERGY         register_event("damage", "dest_damage", "b", "2!0")                   // HEAL LOOP         set_task(30.0,"dest_loop",0,"",0,"b" )                   // EXTRA KNIFE DAMAGE         register_event("damage", "dest_damage", "b", "2!0")                   // Let server know about Destroyer's max knife speed         shSetMaxSpeed(gHeroName, "dest_knifespeed", "[29]" )                    gMultiplier = get_cvar_float("dest_hppercent")                    //SUPERHERO tells max health          register_srvcmd("dest_maxhealth", "dest_maxhealth")          shRegMaxHealth(gHeroName, "dest_maxhealth" )           } //---------------------------------------------------------------------------------------------- public dest_init() {         // First Argument is an id         new temp[6]         read_argv(1,temp,5)         new id=str_to_num(temp)                   // 2nd Argument is 0 or 1 depending on whether the id has destroyer skills         read_argv(2,temp,5)         new hasPowers = str_to_num(temp)                   gPlayerMaxHealth[id] = 100         gHasDestroyerPowers[id] = (hasPowers!=0)                   // Got to take away powers from a user that dropped Destroyer         if ( !hasPowers && is_user_connected(id) ) {                 shRemHealthPower(id)                 shRemGravityPower(id)                 shRemArmorPower(id)                 shRemSpeedPower(id)         }        } //---------------------------------------------------------------------------------------------- public dest_loop() {         if (!shModActive()) return         for ( new id = 1; id <= SH_MAXSLOTS; id++ ) {                 if (  gHasDestroyerPowers[id] && is_user_alive(id) ) {                         // Let the server add the hps back since the # of max hps is controlled by it                         shAddHPs(id, gHealPoints, gPlayerMaxHealth[id] )                 }         } } //---------------------------------------------------------------------------------------------- public dest_levels() {         new id[5]         new lev[5]                   read_argv(1,id,4)         read_argv(2,lev,4)                   gPlayerLevels[str_to_num(id)] = str_to_num(lev) } //---------------------------------------------------------------------------------------------- public dest_damage(id) {         if (!shModActive() || !is_user_connected(id)) return                   new damage = read_data(2)         new attacker = get_user_attacker(id)                   if ( attacker <= 0 || attacker > SH_MAXSLOTS ) return                   if ( gHasDestroyerPowers[attacker] && is_user_alive(attacker) && attacker != id ) {                 //Add som HP back!                 gMultiplier = get_cvar_float("dest_hppercent")                 new giveHPs = floatround( damage * gMultiplier * gPlayerLevels[attacker] )                 if (get_user_health(attacker) < gPlayerMaxHealth[attacker] && giveHPs > 0 ) {                         new alphanum = damage * 2                         if (alphanum > 200) alphanum = 200                         else if (alphanum < 40) alphanum = 40                         setScreenFlash(attacker, 255, 10, 10, 10, alphanum )                         shAddHPs(attacker, giveHPs, gPlayerMaxHealth[attacker] )                 }         } } //---------------------------------------------------------------------------------------------- public dest_maxhealth() {         new id[6]         new health[9]                   read_argv(1,id,5)         read_argv(2,health,8)                   gPlayerMaxHealth[str_to_num(id)] = str_to_num(health) } //---------------------------------------------------------------------------------------------- public client_connect(id) {         gHasDestroyerPowers[id] = false } //----------------------------------------------------------------------------------------------
mage is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-27-2005 , 04:08  
Reply With Quote #2

u riped the hero and still put ur name on it
Code:
register_plugin("SUPERHERO Destroyer","1.0","spyhunter")

second of all it be nice to know what needs fixing
Freecode is offline
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 08-27-2005 , 04:28  
Reply With Quote #3

there shouldnt be anything wrong with it if u just renamed it all

o and i dont care if he just put his name on it
notorious-sk8er is offline
mage
Senior Member
Join Date: Sep 2005
Old 08-27-2005 , 04:48  
Reply With Quote #4

ye i gonna make a credits go to chaos but i have used pawn in 3 days or 2 now so i don't know if i suld just take and write in my txt editor //credits go to chaos for most of the code.
mage is offline
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 08-27-2005 , 05:03  
Reply With Quote #5

tell me the exact errors and ill fix them
notorious-sk8er is offline
mage
Senior Member
Join Date: Sep 2005
Old 08-27-2005 , 05:07  
Reply With Quote #6

Quote:
Originally Posted by chaos_raptor
sk8er]there shouldnt be anything wrong with it if u just renamed it all
i did not rename it i used your code and tried write my own. (if it helps any thing to know that)
mage is offline
mage
Senior Member
Join Date: Sep 2005
Old 08-27-2005 , 11:08  
Reply With Quote #7

ok please help me.

i have sendet the errors when compilling and i changed so it showes in small so it is easier to see where all the lines is. and i changed the post saying it is somting wrong with lines 112 111 108 becouse i fixed them. i fixed the error on the lines 90-93 to. will change to the next compile error. that i get when i try befor it was 8 now its 7 errors.

(i changed the code to stand in small so it is easier to see the lines. and i moved the things on my second post here that i sayd it was stoming wrong with lines 112 111 and 108 becouse i fixed them. and i found a syntax error at the lines 90-93 that was one of the compiler errors. and have now set the new compiler errors in. and it was 8 errors befor only 7 more to help me with)
mage is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 08-27-2005 , 16:24  
Reply With Quote #8

gHasDestroyerpowers

and

gHasDestroyerPowers

are not the same get it?
__________________
yang is offline
Send a message via AIM to yang
mage
Senior Member
Join Date: Sep 2005
Old 08-28-2005 , 00:58  
Reply With Quote #9

ye so i suld change gHasDestroyerpowers to gHasDestroyerPowers?




OK here is the new errors that i did not understand how to fix. (check my errors i have changed it so it shows the new errors)
mage is offline
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 08-28-2005 , 01:15  
Reply With Quote #10

ok. the variable names are Case Sensative. So make sure they are typed correct.
Freecode is offline
Reply



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 06:42.


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