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

Help with float


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 12-18-2009 , 01:58   Help with float
Reply With Quote #1

Hi there, im making a VIP parachute plugin and i get error when i converted the plugin to FM. Please help, thnx in advance.

Code:
#define entity_get_float(%1,%2,%3) pev(%1, %2, %3)
#define entity_set_float(%1,%2,%3) set_pev(%1, %2, %3)

                    if (para_ent[id] > 0)
                    {
                        velocity[2] = (velocity[2] + 40.0 < -100) ? velocity[2] + 40.0 : -100.0
                        entity_set_vector(id, pev_velocity, velocity)
                        if (entity_get_float(para_ent[id], pev_frame) < 0.0 || entity_get_float(para_ent[id], pev_frame) > 254.0)
                        {
                            if (entity_get_int(para_ent[id], pev_sequence) != 1)
                            {
                                entity_set_int(para_ent[id], pev_sequence, 1)
                            }
                            entity_set_float(para_ent[id], pev_frame, 0.0)
                        }
                        else 
                        {
                            entity_set_float(para_ent[id], pev_frame, entity_get_float(para_ent[id], pev_frame) + 1.0)
                        }
                    }
The engine code was
Code:
                    if (para_ent[id] > 0)
                    {
                        velocity[2] = (velocity[2] + 40.0 < -100) ? velocity[2] + 40.0 : -100.0
                        entity_set_vector(id, EV_VEC_velocity, velocity)
                        if (entity_get_float(para_ent[id], EV_FL_frame) < 0.0 || entity_get_float(para_ent[id], EV_FL_frame) > 254.0)
                        {
                            if (entity_get_int(para_ent[id], EV_INT_sequence) != 1)
                            {
                                entity_set_int(para_ent[id], EV_INT_sequence, 1)
                            }
                            entity_set_float(para_ent[id], EV_FL_frame, 0.0)
                        }
                        else 
                        {
                            entity_set_float(para_ent[id], EV_FL_frame, entity_get_float(para_ent[id], EV_FL_frame) + 1.0)
                        }
                    }
The error is
Code:
Error: Undefined symbol "entity_get_float" on line 229
Error: Undefined symbol "entity_get_float" on line 239
__________________
Who need lockerz invite? Pm me.

Last edited by AcidoX; 12-18-2009 at 02:00.
AcidoX is offline
Send a message via Skype™ to AcidoX
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-18-2009 , 02:30   Re: Help with float
Reply With Quote #2

There is not needed to convert to fakemeta. Plus, the way you use the macro doesn't make sense. Replace directly in the code.
__________________
Arkshine is offline
AcidoX
Senior Member
Join Date: Oct 2007
Location: Vilnius
Old 12-18-2009 , 09:37   Re: Help with float
Reply With Quote #3

Hm... Ok.
__________________
Who need lockerz invite? Pm me.
AcidoX is offline
Send a message via Skype™ to AcidoX
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:23.


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