AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   register_native and floats (https://forums.alliedmods.net/showthread.php?t=47070)

Politics 11-09-2006 03:54

register_native and floats
 
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);

Greenberet 11-09-2006 04:12

Re: register_native and floats
 
Code:
public natv_ftest(id) {     return _:testfloat;    //says the error is on this line "tag mismatch" }

Zenith77 11-09-2006 08:26

Re: register_native and floats
 
Better...
Code:
public Float:natv_ftest(id) {     return testfloat;    //says the error is on this line "tag mismatch" }


All times are GMT -4. The time now is 06:55.

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