Raised This Month: $ Target: $400
 0% 

i had sum errors


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrAzy F00L
Member
Join Date: Mar 2004
Old 02-14-2005 , 00:09   i had sum errors
Reply With Quote #1

Code:
#include <amxmodx> #include <amxmisc> #include <string> #include <float> #include <engine> new beam, boom public vexd_pfntouch(pToucher, pTouched) {     new szClassName[32]     entity_get_string(pToucher, EV_SZ_classname, szClassName, 32);     if(equal(szClassName, "vexd_rocket") || equal(szClassName, "vexd_vrocket")) {         emit_sound(pToucher, CHAN_WEAPON, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)         emit_sound(pToucher, CHAN_VOICE, "vox/_period.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)         new Float:vExplodeAt[3]         entity_get_vector(pToucher, EV_VEC_origin, vExplodeAt)         RadiusDamage(vExplodeAt, 1, 50)         message_begin(MSG_BROADCAST, SVC_TEMPENTITY)         write_byte(3)         write_coord(floatround(vExplodeAt[0]))         write_coord(floatround(vExplodeAt[1]))         write_coord(floatround(vExplodeAt[2]))         write_short(boom)         write_byte(50)         write_byte(15)         write_byte(0)         message_end()         new iOwner         iOwner = entity_get_edict(pToucher, EV_ENT_owner)         attach_view(iOwner, iOwner)    //Resets rocket owner's view (in case of vrocket).         remove_entity(pToucher)     }     return 1; } public Vexd_CreateRocket(id,level,cid){     if (!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new Float:vOrigin[3]     new Float:vAngles[3]     entity_get_vector(id, EV_VEC_origin, vOrigin)     entity_get_vector(id, EV_VEC_v_angle, vAngles)         new NewEnt         NewEnt = create_entity("info_target")         if(NewEnt == 0) {             return PLUGIN_HANDLED_MAIN         }     entity_set_string(NewEnt, EV_SZ_classname, "vexd_rocket")         entity_set_model(NewEnt, "models/rpgrocket.mdl")     new Float:MinBox[3]     new Float:MaxBox[3]     MinBox[0] = -1.0     MinBox[1] = -1.0     MinBox[2] = -1.0     MaxBox[0] = 1.0     MaxBox[1] = 1.0     MaxBox[2] = 1.0     entity_set_vector(NewEnt, EV_VEC_mins, MinBox)     entity_set_vector(NewEnt, EV_VEC_maxs, MaxBox)     entity_set_origin(NewEnt, vOrigin)     entity_set_vector(NewEnt, EV_VEC_angles, vAngles)     entity_set_int(NewEnt, EV_INT_effects, 64)  //64 = EF_LIGHT, rocket glow. 64??     entity_set_int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)     entity_set_int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.     entity_set_vector(NewEnt, EV_ENT_owner, id)     new Float:fNewVelocity[3]     VelocityByAim(id, 400, fNewVelocity)     entity_set_int(NewEnt, EV_VEC_velocity, fNewVelocity)     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)     write_byte(22)     write_short(NewEnt)     write_short(beam)     write_byte(45)     write_byte(4)     write_byte(255)     write_byte(0)     write_byte(0)     write_byte(128)     message_end()     emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     return PLUGIN_HANDLED_MAIN } public Vexd_CreateVRocket(id,level,cid){     if (!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED     new Float:vOrigin[3]     new Float:vAngles[3]     entity_get_vector(id, EV_VEC_origin, vOrigin)     entity_get_vector(id, EV_VEC_v_angle, vAngles)         new NewEnt         NewEnt = create_entity("info_target")         if(NewEnt == 0) {             return PLUGIN_HANDLED_MAIN         }     entity_get_string(NewEnt, EV_SZ_classname, "vexd_vrocket")         entity_set_model(NewEnt, "models/rpgrocket.mdl")     new Float:MinBox[3]     new Float:MaxBox[3]     MinBox[0] = -1.0     MinBox[1] = -1.0     MinBox[2] = -1.0     MaxBox[0] = 1.0     MaxBox[1] = 1.0     MaxBox[2] = 1.0     entity_set_vector(NewEnt, EV_VEC_mins, MinBox)     entity_set_vector(NewEnt, EV_VEC_maxs, MaxBox)     entity_set_origin(NewEnt, vOrigin)     entity_set_vector(NewEnt, EV_VEC_angles, vAngles)     entity_set_int(NewEnt, EV_INT_effects, 64)  //1 = EF_LIGHT, rocket glow. 64??     entity_set_int(NewEnt, EV_INT_solid, 2)    //2 = Solid bbox. (const.h)     entity_set_int(NewEnt, EV_INT_movetype, 5) //5 = movetype_fly, No grav, but collides.     entity_set_edict(NewEnt, EV_ENT_owner, id)     new Float:fNewVelocity[3]     VelocityByAim(id, 400, fNewVelocity)     entity_set_vector(NewEnt, EV_VEC_velocity, fNewVelocity)     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)     write_byte(22)     write_short(NewEnt)     write_short(beam)     write_byte(45)     write_byte(4)     write_byte(255)     write_byte(0)     write_byte(0)     write_byte(128)     message_end()     emit_sound(NewEnt, CHAN_WEAPON, "weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     emit_sound(NewEnt, CHAN_VOICE, "weapons/rocket1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)     attach_view(id, NewEnt)     return PLUGIN_HANDLED_MAIN } public RocketThink() {     new id, iCurrent     new Float:vAngles[3], Float:fNewVelocity[3]     iCurrent = find_ent_by_tname(-1, "vexd_vrocket")     while (iCurrent != -1)     {         id = entity_get_edict(iCurrent, EV_ENT_owner)         entity_get_vector(id, EV_VEC_v_angle, vAngles)         VelocityByAim(id, 400, fNewVelocity)         entity_set_vector(iCurrent, EV_VEC_angles, vAngles)         entity_set_vector(iCurrent, EV_VEC_velocity, fNewVelocity)         iCurrent =  find_ent_by_tname(iCurrent, "vexd_vrocket")     } } public plugin_init(){     register_plugin("Vexd Entity demo (Rocket)","1.00","default")     register_clcmd("amx_rocket","Vexd_CreateRocket",ADMIN_KICK)     register_clcmd("amx_vrocket","Vexd_CreateVRocket",ADMIN_KICK)     set_task(0.1, "RocketThink", 0, "", 0, "b")     return PLUGIN_CONTINUE } public plugin_precache() {     precache_sound("vox/_period.wav")     precache_sound("weapons/rocketfire1.wav")     precache_sound("weapons/rocket1.wav")     precache_model("models/rpgrocket.mdl")     beam = precache_model("sprites/laserbeam.spr")     boom = precache_model("sprites/zerogxplode.spr")     return PLUGIN_CONTINUE }

the offending lines are

Code:
    entity_set_vector(NewEnt, EV_ENT_owner, id)

and

Code:
    entity_set_int(NewEnt, EV_VEC_velocity, fNewVelocity)


the errors are

Code:
rocket.sma(82)
error 035: argument type mismatch (argument 3)
rocket.sma(87)
error 035: argument type mismatch (argument 3)
rocket.sma(123)
warning 202: number of arguments does not match definition
there are a bunch of loose indentation warnings but those shoudn't matter.

any help is greatly appreciated.
__________________
~Crazy Fool AKA Scarface
CrAzy F00L is offline
Send a message via AIM to CrAzy F00L
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-14-2005 , 01:38  
Reply With Quote #2

Don't double-post.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
CrAzy F00L
Member
Join Date: Mar 2004
Old 02-14-2005 , 02:37  
Reply With Quote #3

my last post was asking what the natives are for engine, this thread is asking how i can fix those errors.
__________________
~Crazy Fool AKA Scarface
CrAzy F00L is offline
Send a message via AIM to CrAzy F00L
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:24.


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