Raised This Month: $ Target: $400
 0% 

register_native and floats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Politics
Junior Member
Join Date: Nov 2006
Old 11-09-2006 , 03:54   register_native and floats
Reply With Quote #1

I have a problem when trying to return a float from a function registered with register_native. It works completly fine when I use integers but gives an error when I tried to use floats. Any suggetions?

//In The Plugin
new Float:thistest

thistest=g_ftest(id)


//The Plugin That Contains The Native Register
new Float:testfloat=4.44;

register_native("g_ftest","natv_ftest",1);

public natv_ftest(id)
{
return testfloat; //says the error is on this line "tag mismatch"
}


//The .inc for the registers
native Float:g_ftest(id);
Politics is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 11-09-2006 , 04:12   Re: register_native and floats
Reply With Quote #2

Code:
public natv_ftest(id) {     return _:testfloat;    //says the error is on this line "tag mismatch" }
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
Zenith77
Veteran Member
Join Date: Aug 2005
Old 11-09-2006 , 08:26   Re: register_native and floats
Reply With Quote #3

Better...
Code:
public Float:natv_ftest(id) {     return testfloat;    //says the error is on this line "tag mismatch" }
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 06:55.


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