Raised This Month: $ Target: $400
 0% 

Need some help @ spawning an entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vampire
New Member
Join Date: Apr 2005
Location: Hannover, Germany
Old 04-16-2005 , 11:14   Need some help @ spawning an entity
Reply With Quote #1

*updated*

Hi, i have a problem at spawning an entity.
Code:
#include <amxmodx> #include <amxmisc> #include <ns2amx> #include <engine> public plugin_init() {   register_plugin("test","0.9b","B")   register_clcmd("say /armory","cmdArmory",ADMIN_MAP,"spawn a armory")   register_cvar ("amx_test_debug","0") // debug messages disabled by default } public cmdArmory(id) {       new ent       ent = create_entity("team_armory")       new szOrigin[128]       new origin[3]       get_user_origin(id,origin,0)             format(szOrigin,127,"%d %d %d",origin[0],origin[1],origin[2])       entity_set_origin ( ent, szOrigin[127] ) // <- row 23 return PLUGIN_HANDLED; }
the team_armory is an ns specific entity, so dont wonder about it
Now the problem:
I get this error on compiling
Code:
test.sma(23) : error 047: array sizes must match
test.sma(25) : warning 217: loose indentation
thanks in advanced

-vampire
vampire is offline
Send a message via ICQ to vampire
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-16-2005 , 12:03  
Reply With Quote #2

Code:
public cmdArmory(id) {       new ent       ent = create_entity("team_armory")       new origin[3]       get_user_origin(id,origin,0)             entity_set_origin ( ent, origin ) // <- row 23       return PLUGIN_HANDLED; }
xeroblood is offline
Send a message via MSN to xeroblood
vampire
New Member
Join Date: Apr 2005
Location: Hannover, Germany
Old 04-16-2005 , 12:09  
Reply With Quote #3

wee thx
i still get a warning 213: tag mismatch
dunno whats up with that
vampire is offline
Send a message via ICQ to vampire
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-16-2005 , 12:28  
Reply With Quote #4

entity_set_origin takes a Float array! :-p

Code:
public cmdArmory(id) {       new ent       ent = create_entity("team_armory")       new Float:origin[3]       emtity_get_vector(id,EV_VEC_origin,origin);               entity_set_origin ( ent, origin )       return PLUGIN_HANDLED; }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-16-2005 , 16:04  
Reply With Quote #5

Quote:
Originally Posted by XxAvalanchexX
entity_set_origin takes a Float array! :-p
was in a rush! lol.. I knew you'd pick it up!!
xeroblood is offline
Send a message via MSN to xeroblood
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 09:55.


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