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

Probably very simple mistake


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mammapappa
Member
Join Date: Nov 2008
Old 03-25-2012 , 07:27   Probably very simple mistake
Reply With Quote #1

Ok so i get two warnings when i compile my plugin and it these two lines:

PHP Code:
new Float:fTime pev(entpev_ltime); 
PHP Code:
new Float:current_frame pev(entpev_frame); 
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Warning: Tag mismatch on line 1173
Warning: Tag mismatch on line 2483
Header size:           4104 bytes
Code size:           153460 bytes
Data size:           138804 bytes
Stack/heap size:      16384 bytes; max. usage is unknown, due to recursion
Total requirements:  312752 bytes

2 Warnings.
Done.

Last edited by mammapappa; 03-25-2012 at 07:35. Reason: added warnings
mammapappa is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-25-2012 , 07:28   Re: Probably very simple error
Reply With Quote #2

maybe you can show us the warnings?
Bilal Pro is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 03-25-2012 , 07:45   Re: Probably very simple mistake
Reply With Quote #3

PHP Code:
new Float:fTime pev(entpev_ltime
PHP Code:
new Float:current_frame pev(entpev_frame
try this
Bilal Pro is offline
mammapappa
Member
Join Date: Nov 2008
Old 03-25-2012 , 07:59   Re: Probably very simple mistake
Reply With Quote #4

Quote:
Originally Posted by Bilal Pro View Post
PHP Code:
new Float:fTime pev(entpev_ltime
PHP Code:
new Float:current_frame pev(entpev_frame
try this
that will just give error because it misses ) in the end
mammapappa is offline
t3hNox
Senior Member
Join Date: Oct 2009
Old 03-25-2012 , 08:02   Re: Probably very simple mistake
Reply With Quote #5

With floats it works like this:

Code:
new Float:current_frame
pev(ent, pev_frame, current_frame);
t3hNox is offline
Xvil
BANNED
Join Date: Feb 2012
Old 03-25-2012 , 08:06   Re: Probably very simple mistake
Reply With Quote #6

Code:
new Float:current_frame = pev(ent, pev_frame)new Float:current_frame = pev(ent, pev_frame);

==>

Code:
new current_frame = pev(ent, pev_frame)new fTime = pev(ent, pev_ltime); float(current_frame); float(fTime);

because pev_frame and pev_ltime return with demical value

Last edited by Xvil; 03-25-2012 at 08:07.
Xvil is offline
mammapappa
Member
Join Date: Nov 2008
Old 03-25-2012 , 08:10   Re: Probably very simple mistake
Reply With Quote #7

Quote:
Originally Posted by Xvil View Post
Code:
new Float:current_frame = pev(ent, pev_frame)new Float:current_frame = pev(ent, pev_frame);

==>

Code:
new current_frame = pev(ent, pev_frame)new fTime = pev(ent, pev_ltime); float(current_frame); float(fTime);

because pev_frame and pev_ltime return with demical value
It worked thank you so much
mammapappa is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-25-2012 , 08:17   Re: Probably very simple mistake
Reply With Quote #8

Quote:
Originally Posted by Xvil View Post
Code:
new Float:current_frame = pev(ent, pev_frame)new Float:current_frame = pev(ent, pev_frame);

==>

Code:
new current_frame = pev(ent, pev_frame)new fTime = pev(ent, pev_ltime); float(current_frame); float(fTime);

because pev_frame and pev_ltime return with demical value
Totally wrong... Seriously, stop to help, you don't know what you're doing.

The right way to retrieve a float with pev is :

new Float:var;
pev(ent, pev_ltime, var );
__________________
Arkshine is offline
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 15:14.


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