Raised This Month: $32 Target: $400
 8% 

Blowback Bob help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 08-31-2005 , 14:31   Blowback Bob help
Reply With Quote #1

these errors idk how to fix can sum1 help me?

Errors:
sh_blowbackbob.sma(130) : error 017: undefined symbol "enemyPushed"
sh_blowbackbob.sma(14 : error 054: unmatched closing brace


here is the .sma code
Code:
//Blowback Bob ( idea from -: Xdc :- SqUiD!) /* //Blowback Bob bob_level 9 bob_cooldown 10 //time b4 he can push again bob_radius 900  //radius of the wind bob_power 750   //Force of the wind */ #include <amxmod> #include <Vexd_Utilities> #include <superheromod> // GLOBAL VARIABLES new gHeroName[]="Blowback Bob" new bool:gHasBlowbackbobPower[SH_MAXSLOTS+1] //---------------------------------------------------------------------------------------------- public plugin_init() {     // Plugin Info     register_plugin("SUPERHERO Blowback Bob", "1.1", "sk8er/-: Xdc :- SqUiD!")     // DO NOT EDIT THIS FILE TO CHANGE CVARS, USE THE SHCONFIG.CFG     register_cvar("bob_level", "9")     register_cvar("bob_cooldown", "25")     register_cvar("bob_radius", "900")     register_cvar("bob_power", "750")     // FIRE THE EVENT TO CREATE THIS SUPERHERO!     shCreateHero(gHeroName, "Powerful Wind", "On Keydown use powerful wind to push ppl away", true, "bob_level")     // REGISTER EVENTS THIS HERO WILL RESPOND TO! (AND SERVER COMMANDS)     // INIT     register_srvcmd("bob_init", "bob_init")     shRegHeroInit(gHeroName, "bob_init")     register_event("ResetHUD", "newSpawn", "b")     // KEY DOWN     register_srvcmd("bob_kd", "bob_kd")     shRegKeyDown(gHeroName, "bob_kd") } //---------------------------------------------------------------------------------------------- public bob_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 Blowback Bob     read_argv(2, temp, 5)     new hasPowers = str_to_num(temp)     gHasBlowbackbobPower[id] = (hasPowers != 0) } //---------------------------------------------------------------------------------------------- public newSpawn(id) {     gPlayerUltimateUsed[id] = false } //---------------------------------------------------------------------------------------------- // RESPOND TO KEYDOWN public bob_kd() {     if ( !shModActive() || !hasRoundStarted() ) return     // First Argument is an id     new temp[6]     read_argv(1,temp,5)     new id=str_to_num(temp)     if ( !is_user_alive(id) || !gHasBlowbackbobPower[id] ) return     if ( gPlayerUltimateUsed[id] ) {         playSoundDenySelect(id)         return     }     force_wind(id) } //---------------------------------------------------------------------------------------------- public force_wind(id) {     new team[33], players[32], pnum, origin[3], vorigin[3], parm[4]     new Float:tempVelocity[3] = {0.0, 0.0, 200.0}     new bool:enemyPushed = false     get_user_team(id, team, 32)     // Find all alive enemies     if ( equali(team, "CT") ) {         get_players(players, pnum, "ae", "TERRORIST")     }     else {         get_players(players, pnum, "ae", "CT")     }     get_user_origin(id, origin)     for ( new victim = 0; victim < pnum; victim++ ) {         get_user_origin(players[victim], vorigin)         if ( get_distance(origin, vorigin) < get_cvar_num("bob_radius") ) {             // Set cooldown/sound/self damage only once, if push is used             if ( !enemyPushed ) {                 if (get_cvar_float("bob_cooldown") > 0.0) ultimateTimer(id, get_cvar_float("bob_cooldown"))                 }                 enemyPushed = true             }             // Stun enemy makes them easier to push             shStun(players[victim], 1)             set_user_maxspeed(players[victim], 1.0)             // First lift them             Entvars_Set_Vector(players[victim], EV_VEC_velocity, tempVelocity)             // Then push them back in x seconds after lift and do some damage             set_task(0.1, "move_enemy", 0, parm, 4)         }     }     if ( !enemyPushed && is_user_alive(id) ) {         client_print(id, print_chat, "[SH](Blowback Bob) No one around")     } } //---------------------------------------------------------------------------------------------- public move_enemy(parm[]) {     new victim = parm[2]     new id = parm[3]     new Float:fl_velocity[3]     fl_velocity[0] = float(parm[0])     fl_velocity[1] = float(parm[1])     fl_velocity[2] = 200.0     Entvars_Set_Vector(victim, EV_VEC_velocity, fl_velocity)     } } //----------------------------------------------------------------------------------------------

can any1 help me?
notorious-sk8er is offline
yang
Veteran Member
Join Date: May 2005
Location: galoreservers.net
Old 08-31-2005 , 15:08  
Reply With Quote #2

Quote:
public move_enemy(parm[])
{
new victim = parm[2]
new id = parm[3]

new Float:fl_velocity[3]
fl_velocity[0] = float(parm[0])
fl_velocity[1] = float(parm[1])
fl_velocity[2] = 200.0

Entvars_Set_Vector(victim, EV_VEC_velocity, fl_velocity)

}
}
U notice the extra brace?
remove it o.o

As for the bool not being recognized I think its the way u set braces on that one too O.o not sure don't really have time to copy n paste it to try it o.O... but if it says its undefined it must be the way u setup the braces cuz u defined enemypush o.O

also when u set the task for setting the velocity of the player, u did not at all define what parm[0]-parm[3] are i don't think o.O

so when u have new id = parm[0] etc it just register a 0 i think lol... u might wanna register the victims to those first...
__________________
yang is offline
Send a message via AIM to yang
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 08-31-2005 , 15:20  
Reply With Quote #3

im not totally sure where to fix the braces for the undefined symbol
notorious-sk8er is offline
-: Xdc :- SqUiD!
Senior Member
Join Date: Jul 2005
Location: Canada B.C.
Old 08-31-2005 , 17:50  
Reply With Quote #4

DUDE THANK YOU SOO MUCH FOR MAKING THIS HERO
__________________
Myishi Corporation.
te_ Maps
-: Xdc :- SqUiD! is offline
Send a message via AIM to -: Xdc :- SqUiD! Send a message via MSN to -: Xdc :- SqUiD!
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 08-31-2005 , 18:12  
Reply With Quote #5

Since your just ripping yoda, why don't you just rename it then it will work...
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 08-31-2005 , 18:35  
Reply With Quote #6

bc im not
vittu can u just help?
sh_blowbackbob.sma(130) : error 017: undefined symbol "enemyPushed"

how can i fix that
notorious-sk8er is offline
-: Xdc :- SqUiD!
Senior Member
Join Date: Jul 2005
Location: Canada B.C.
Old 08-31-2005 , 19:06  
Reply With Quote #7

i suggested this hero a while back and then he posted a topic called need hero ideas so i gave him my old idea
this is nothing like yoda at all
when you use the power it creates wind not lifting them or anything just blowing them back and when u run towards the wind you just stay in spot when you let go on running forward towards wind you blow back get it?!
__________________
Myishi Corporation.
te_ Maps
-: Xdc :- SqUiD! is offline
Send a message via AIM to -: Xdc :- SqUiD! Send a message via MSN to -: Xdc :- SqUiD!
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 08-31-2005 , 19:14  
Reply With Quote #8

Quote:
Originally Posted by chaos_raptor
sk8er]bc im not
I would help if you didnt lie... Don't tell me your not ripping code from yoda. I can tell where everyone is ripping code from just by looking at their code, don't make me get out the comparing tool to show you...

In the very least you should be giving credit to the people whose code your using... Take your hero above for example. You should have commented at the top of it some respect to the authors you stole the code from ie. //code used from Asskicr's hero plugin Yoda, or something like that...


I don't understand you people you act like I wouldn't know where the code is from, or even the fact that I wrote the code your using.
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
notorious-sk8er
Senior Member
Join Date: Jun 2005
Old 08-31-2005 , 20:03  
Reply With Quote #9

w/e ill put it in if u want (even though its not a rip, i got help with the wind code from yoda but i didnt copy and paste like ur saying i did)if u help me
notorious-sk8er is offline
vittu
SuperHero Moderator
Join Date: Oct 2004
Location: L.A. County, CA
Old 08-31-2005 , 21:27  
Reply With Quote #10

ugh fine here comes a report of changes then. Only things changed were yoda to bob and vic to victim, plus you removed lines of code which is why it's not working.

Why can't you just admit it (people like you piss me off), and no i dont want credit. I said credit the authors. Your wose then Omega was about believing he wasn't ripping code...


http://www.thekingpin.net/adminspace/vittu/report2.html - lines on right are the differences, stuff in red is the changes, grey on right is removed code, anything white is the same. Next time don't f'in bs...


(reason for that extra brace Rockell is talking about is he removed where yoda sets damage but left the ending brace there.)


-------------------
Edit: It doesn't even do what the guy asked for, the code is force push the guy requested this;
Ability: On Keydown Create Wind, it will make them slow down but when they let go of foward key you blow back like wind
Ability2: Somthing Like Captian America, Vash's random hitzone (somthing like 1 second godmode random)
vittu is offline
Send a message via AIM to vittu Send a message via MSN to vittu Send a message via Yahoo to vittu
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 19:18.


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