Raised This Month: $ Target: $400
 0% 

trouble returning a float from a stock


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
diamond-optic
Veteran Member
Join Date: May 2005
Old 01-22-2009 , 22:00   trouble returning a float from a stock
Reply With Quote #1

alright i feel really dumb about not understanding why this is happening..

but anyway im getting tag mismatch errors when i call the stock and also at the end of the stock (at the closing }), ingame it all seems to still work fine, but id really like to get rid of the error msgs..

this is in a function where its called:
Code:
new Float:hitOrigin[3] hitOrigin = get_hitplace_origin(victim,hitplace)

here's the stock:
Code:
stock get_hitplace_origin(id,hitplace) {     new Float:origin[3],Float:angles[3]     switch(hitplace)         {         case HIT_HEAD: hitplace = 19         case HIT_CHEST: hitplace = 11         case HIT_LEFTARM: hitplace = 15         case HIT_RIGHTARM: hitplace = 18         case HIT_STOMACH: hitplace = 9         case HIT_GENERIC: hitplace = 10         case HIT_LEFTLEG: hitplace = 3         case HIT_RIGHTLEG: hitplace = 6         }         engfunc(EngFunc_GetBonePosition,id,hitplace,origin,angles)                         return origin }

i do not get these errors if i dont use floats, but i rather just use the floats and save myself from having to convert them back and forth if at all possible
__________________
diamond-optic is offline
 



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 01:49.


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