[Ajuda] Floatstr
#1

Bom gente eu to com um maldito problema. Toda vez que eu tento usar qualquer tipo de cache ou salvador de arquivo, da esse erro:

Код:
 error 017: undefined symbol "floatstr"
 error 017: undefined symbol "floatstr"
 error 017: undefined symbol "floatstr"
Linhas:

pawn Код:
if(INI_ReadFloat("Vida") == 0.0) return INI_Close();
        SetPlayerHealth(playerid, INI_ReadFloat("Vida"));
        SetPlayerArmour(playerid, INI_ReadFloat("Colete"));
Por favor eu nao aguento mais esses erros, eu ja mudei as includes e baxei de novo, baxei um monte de fs que utiliza bini, eu ja tentei fini, dfie, dini, fini e toda vez da esse erro. E no meu gm nao tem nada NADA escrito floatstr, em outros fs aponta que e na include, ja tentei baixar diverssas versoes das includes, e aparece isso em todas. Dini fini bini. Eu tentei colocar pra compilar infernos pawn editor, no pawno, o programa original, nao sei mais o que faze eu nao consigo mais usar include de salvamento de arquivo. Desde ja grato
Reply
#2

Nгo vejo floatstr algum ae.
Reply
#3

Entao eu nao entendo isso caraa nao tem nada chamado floatstr no codigo afff ta erro em qualquer salvador eu to ate achando que foi desativado os caches no 0.3d :X que odio
Qualquer script que eu coloco #include <qualquer sistema de salvamento> bini, dini dfile sii, qualquer 1, da errro. eu ja tentei em outro compilador, tentei trocar as includes, tentei varios fs com salvamento diferente e da esse erro odio
Reply
#4

Pode me mandar a lista de includes? Do jeito que estгo no cуdigo.
Reply
#5

Код:
#include <a_samp>
#include <bini>
Minha include a samp:

pawn Код:
/*  SA-MP Functions
 *
 *  © Copyright 2005-2011, SA-MP Team
 *
 */


#if defined _samp_included
    #endinput
#endif
#define _samp_included
#pragma library samp

#pragma tabsize 4
// Ignores warning 217 for properly indented PAWNO code
// It's tab size is 4 and often uses 4 spaces instead, PAWNCC's is 8

#include <core>
#include <float>
#include <string>
#include <file>
#include <time>
#include <datagram>
#include <a_players>
#include <a_vehicles>
#include <a_objects>
#include <a_sampdb>

// Limits and internal constants
#define MAX_PLAYER_NAME                         (24)
#define MAX_PLAYERS                             (500)
#define MAX_VEHICLES                            (2000)
#define INVALID_PLAYER_ID                       (0xFFFF)
#define INVALID_VEHICLE_ID                      (0xFFFF)
#define NO_TEAM                                 (255)
#define MAX_OBJECTS                             (1000)
#define INVALID_OBJECT_ID                       (0xFFFF)
#define MAX_GANG_ZONES                          (1024)
#define MAX_TEXT_DRAWS                          (2048)
#define MAX_MENUS                               (128)
#define MAX_3DTEXT_GLOBAL                       (1024)
#define MAX_3DTEXT_PLAYER                       (1024)
#define MAX_PICKUPS                             (4096)
#define INVALID_MENU                            (0xFF)
#define INVALID_TEXT_DRAW                       (0xFFFF)
#define INVALID_GANG_ZONE                       (-1)
#define INVALID_3DTEXT_ID                       (0xFFFF)

// --------------------------------------------------
// Natives
// --------------------------------------------------

// Util
native print(const string[]);
native printf(const format[], {Float,_}:...);
native format(output[], len, const format[], {Float,_}:...);
native SendClientMessage(playerid, color, const message[]);
native SendClientMessageToAll(color, const message[]);
native SendPlayerMessageToPlayer(playerid, senderid, const message[]);
native SendPlayerMessageToAll(senderid, const message[]);
native SendDeathMessage(killer,killee,weapon);
native GameTextForAll(const string[],time,style);
native GameTextForPlayer(playerid,const string[],time,style);
native SetTimer(funcname[], interval, repeating);
native SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...);
native KillTimer(timerid);
native GetTickCount();
native GetMaxPlayers();
native CallRemoteFunction(const function[], const format[], {Float,_}:...);
native CallLocalFunction(const function[], const format[], {Float,_}:...);
native Float:asin(Float:value);
native Float:acos(Float:value);
native Float:atan(Float:value);
native Float:atan2(Float:x, Float:y);

// Game
native SetGameModeText(const string[]);
native SetTeamCount(count);
native AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);
native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay);
native AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native DestroyPickup(pickup);
native ShowNameTags(show);
native ShowPlayerMarkers(mode);
native GameModeExit();
native SetWorldTime(hour);
native GetWeaponName(weaponid, const weapon[], len);
native EnableTirePopping(enable);
native AllowInteriorWeapons(allow);
native SetWeather(weatherid);
native SetGravity(Float:gravity);
native AllowAdminTeleport(allow);
native SetDeathDropAmount(amount);
native CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
native EnableZoneNames(enable);
native UsePlayerPedAnims();     // Will cause the players to use CJ running/walking animations
native DisableInteriorEnterExits();  // will disable all interior enter/exits in the game.
native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client.
native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking
native LimitGlobalChatRadius(Float:chat_radius);
native LimitPlayerMarkerRadius(Float:marker_radius);

// Npc
native ConnectNPC(name[], script[]);
native IsPlayerNPC(playerid);

// Admin
native IsPlayerAdmin(playerid);
native Kick(playerid);
native Ban(playerid);
native BanEx(playerid, const reason[]);
native SendRconCommand(command[]);
native GetServerVarAsString(const varname[], buffer[], len);
native GetServerVarAsInt(const varname[]);
native GetServerVarAsBool(const varname[]);
native GetPlayerNetworkStats(playerid, retstr[], retstr_size);
native GetNetworkStats(retstr[], retstr_size);

// Menu
native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0);
native DestroyMenu(Menu:menuid);
native AddMenuItem(Menu:menuid, column, const menutext[]);
native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]);
native ShowMenuForPlayer(Menu:menuid, playerid);
native HideMenuForPlayer(Menu:menuid, playerid);
native IsValidMenu(Menu:menuid);
native DisableMenu(Menu:menuid);
native DisableMenuRow(Menu:menuid, row);
native Menu:GetPlayerMenu(playerid);

// Text Draw
native Text:TextDrawCreate(Float:x, Float:y, text[]);
native TextDrawDestroy(Text:text);
native TextDrawLetterSize(Text:text, Float:x, Float:y);
native TextDrawTextSize(Text:text, Float:x, Float:y);
native TextDrawAlignment(Text:text, alignment);
native TextDrawColor(Text:text, color);
native TextDrawUseBox(Text:text, use);
native TextDrawBoxColor(Text:text, color);
native TextDrawSetShadow(Text:text, size);
native TextDrawSetOutline(Text:text, size);
native TextDrawBackgroundColor(Text:text, color);
native TextDrawFont(Text:text, font);
native TextDrawSetProportional(Text:text, set);
native TextDrawShowForPlayer(playerid, Text:text);
native TextDrawHideForPlayer(playerid, Text:text);
native TextDrawShowForAll(Text:text);
native TextDrawHideForAll(Text:text);
native TextDrawSetString(Text:text, string[]);

// Gang Zones
native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy);
native GangZoneDestroy(zone);
native GangZoneShowForPlayer(playerid, zone, color);
native GangZoneShowForAll(zone, color);
native GangZoneHideForPlayer(playerid, zone);
native GangZoneHideForAll(zone);
native GangZoneFlashForPlayer(playerid, zone, flashcolor);
native GangZoneFlashForAll(zone, flashcolor);
native GangZoneStopFlashForPlayer(playerid, zone);
native GangZoneStopFlashForAll(zone);

// Global 3D Text Labels
native Text3D:Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS=0);
native Delete3DTextLabel(Text3D:id);
native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
native Update3DTextLabelText(Text3D:id, color, text[]);

// Per-player 3D Text Labels
native PlayerText3D:CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer=INVALID_PLAYER_ID, attachedvehicle=INVALID_VEHICLE_ID, testLOS=0);
native DeletePlayer3DTextLabel(playerid, PlayerText3D:id);
native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, text[]);

// Player GUI Dialog
#define DIALOG_STYLE_MSGBOX     0
#define DIALOG_STYLE_INPUT      1
#define DIALOG_STYLE_LIST       2
#define DIALOG_STYLE_PASSWORD   3

native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);

// --------------------------------------------------
// Defines
// --------------------------------------------------

// States
#define PLAYER_STATE_NONE                       (0)
#define PLAYER_STATE_ONFOOT                     (1)
#define PLAYER_STATE_DRIVER                     (2)
#define PLAYER_STATE_PASSENGER                  (3)
#define PLAYER_STATE_EXIT_VEHICLE               (4) // (used internally)
#define PLAYER_STATE_ENTER_VEHICLE_DRIVER       (5) // (used internally)
#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER    (6) // (used internally)
#define PLAYER_STATE_WASTED                     (7)
#define PLAYER_STATE_SPAWNED                    (8)
#define PLAYER_STATE_SPECTATING                 (9)

// Marker modes used by ShowPlayerMarkers()
#define PLAYER_MARKERS_MODE_OFF         (0)
#define PLAYER_MARKERS_MODE_GLOBAL      (1)
#define PLAYER_MARKERS_MODE_STREAMED    (2)

// Weapons
#define WEAPON_BRASSKNUCKLE             (1)
#define WEAPON_GOLFCLUB                 (2)
#define WEAPON_NITESTICK                (3)
#define WEAPON_KNIFE                    (4)
#define WEAPON_BAT                      (5)
#define WEAPON_SHOVEL                   (6)
#define WEAPON_POOLSTICK                (7)
#define WEAPON_KATANA                   (8)
#define WEAPON_CHAINSAW                 (9)
#define WEAPON_DILDO                    (10)
#define WEAPON_DILDO2                   (11)
#define WEAPON_VIBRATOR                 (12)
#define WEAPON_VIBRATOR2                (13)
#define WEAPON_FLOWER                   (14)
#define WEAPON_CANE                     (15)
#define WEAPON_GRENADE                  (16)
#define WEAPON_TEARGAS                  (17)
#define WEAPON_MOLTOV                   (18)
#define WEAPON_COLT45                   (22)
#define WEAPON_SILENCED                 (23)
#define WEAPON_DEAGLE                   (24)
#define WEAPON_SHOTGUN                  (25)
#define WEAPON_SAWEDOFF                 (26)
#define WEAPON_SHOTGSPA                 (27)
#define WEAPON_UZI                      (28)
#define WEAPON_MP5                      (29)
#define WEAPON_AK47                     (30)
#define WEAPON_M4                       (31)
#define WEAPON_TEC9                     (32)
#define WEAPON_RIFLE                    (33)
#define WEAPON_SNIPER                   (34)
#define WEAPON_ROCKETLAUNCHER           (35)
#define WEAPON_HEATSEEKER               (36)
#define WEAPON_FLAMETHROWER             (37)
#define WEAPON_MINIGUN                  (38)
#define WEAPON_SATCHEL                  (39)
#define WEAPON_BOMB                     (40)
#define WEAPON_SPRAYCAN                 (41)
#define WEAPON_FIREEXTINGUISHER         (42)
#define WEAPON_CAMERA                   (43)
#define WEAPON_PARACHUTE                (46)
#define WEAPON_VEHICLE                  (49)
#define WEAPON_DROWN                    (53)
#define WEAPON_COLLISION                (54)

// Keys
#define KEY_ACTION              (1)
#define KEY_CROUCH              (2)
#define KEY_FIRE                (4)
#define KEY_SPRINT              (8)
#define KEY_SECONDARY_ATTACK    (16)
#define KEY_JUMP                (32)
#define KEY_LOOK_RIGHT          (64)
#define KEY_HANDBRAKE           (128)
#define KEY_LOOK_LEFT           (256)
#define KEY_SUBMISSION          (512)
#define KEY_LOOK_BEHIND         (512)
#define KEY_WALK                (1024)
#define KEY_ANALOG_UP           (2048)
#define KEY_ANALOG_DOWN         (4096)
#define KEY_ANALOG_LEFT         (8192)
#define KEY_ANALOG_RIGHT        (16384)
#define KEY_YES                 (65536)
#define KEY_NO                  (131072)
#define KEY_CTRL_BACK           (262144)

#define KEY_UP                  (-128)
#define KEY_DOWN                (128)
#define KEY_LEFT                (-128)
#define KEY_RIGHT               (128)

// --------------------------------------------------
// Forwards (Callback declarations)
// --------------------------------------------------

forward OnGameModeInit();
forward OnGameModeExit();
forward OnFilterScriptInit();
forward OnFilterScriptExit();
forward OnPlayerConnect(playerid);
forward OnPlayerDisconnect(playerid, reason);
forward OnPlayerSpawn(playerid);
forward OnPlayerDeath(playerid, killerid, reason);
forward OnVehicleSpawn(vehicleid);
forward OnVehicleDeath(vehicleid, killerid);
forward OnPlayerText(playerid, text[]);
forward OnPlayerCommandText(playerid, cmdtext[]);
forward OnPlayerRequestClass(playerid, classid);
forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitVehicle(playerid, vehicleid);
forward OnPlayerStateChange(playerid, newstate, oldstate);
forward OnPlayerEnterCheckpoint(playerid);
forward OnPlayerLeaveCheckpoint(playerid);
forward OnPlayerEnterRaceCheckpoint(playerid);
forward OnPlayerLeaveRaceCheckpoint(playerid);
forward OnRconCommand(cmd[]);
forward OnPlayerRequestSpawn(playerid);
forward OnObjectMoved(objectid);
forward OnPlayerObjectMoved(playerid, objectid);
forward OnPlayerPickUpPickup(playerid, pickupid);
forward OnVehicleMod(playerid, vehicleid, componentid);
forward OnEnterExitModShop(playerid, enterexit, interiorid);
forward OnVehiclePaintjob(playerid, vehicleid, paintjobid);
forward OnVehicleRespray(playerid, vehicleid, color1, color2);
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat);
forward OnPlayerSelectedMenuRow(playerid, row);
forward OnPlayerExitedMenu(playerid);
forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
forward OnRconLoginAttempt( ip[], password[], success );
forward OnPlayerUpdate(playerid);
forward OnPlayerStreamIn(playerid, forplayerid);
forward OnPlayerStreamOut(playerid, forplayerid);
forward OnVehicleStreamIn(vehicleid, forplayerid);
forward OnVehicleStreamOut(vehicleid, forplayerid);
forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid);
forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid);
forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ);

#define CLICK_SOURCE_SCOREBOARD     0
forward OnPlayerClickPlayer(playerid, clickedplayerid, source);
Essa include a samp eu baxei no site da sa-mp oficial veio junto com os arquivos do sever.
Tem como se me passa as suas pra mim testa '-'?
A include bini acabei de baixar e instalar deste topico
Reply
#6

Tira a bini tenta com DOF2.
Reply
#7

Eu baixei um fs de registro simples e a include dof2 e foi '-' Mas o que acontece? Nao da pra usar Bini no 0.3d?
Bini e mais rapido e outra eu nao sei usar dof2 '-'
Reply
#8

pawn Код:
static arquivo[29], nome[24];
GetPlayerName(playerid, nome, sizeof(nome));
format(arquivo, sizeof(arquivo), "%s.ini", nome);

//escrita
DOF2_SetString(arquivo, "Nome", nome);
DOF2_SetInt(arquivo, "Idade", 99);
DOF2_SaveFile();

//leitura
idade = DOF2_GetInt(arquivo, "Idade");
format(nome, sizeof(nome), DOF2_GetString(arquivo, "nome"));//ou use DOF2_GetStringEx
O uso й igual а dini, nгo tem mistйrio...

caso for usar, abaixo a lista das funзхes contidas na include:

pawn Код:
native DOF2_SetFile(file[]);
native DOF2_LoadFile();
native DOF2_SaveFile();
native DOF2_ParseFile(file[],extraid,bool:callback=true);
native DOF2_ReparseFile(file[],extraid,bool:callback=true);
native DOF2_WriteFile();
native DOF2_PrintFile(comment[]="");
native DOF2_GetString(file[],key[],tag[]="");
native DOF2_GetStringEx(file[],key[],result[],size,tag[]="");
native Float:DOF2_GetFloat(file[],key[]);
native DOF2_GetInt(file[],key[],tag[]="");
native DOF2_GetHex(file[],key[],tag[]="");
native DOF2_GetBin(file[],key[],tag[]="");
native bool:DOF2_GetBool(file[],key[],tag[]="");
native DOF2_SetString(file[],key[],value[],tag[]="");
native DOF2_SetFloat(file[],key[],Float:value);
native DOF2_SetInt(file[],key[],value,tag[]="");
native DOF2_SetHex(file[],key[],value,tag[]="");
native DOF2_SetBin(file[],key[],value,tag[]="");
native DOF2_SetBool(file[],key[],bool:value,tag[]="");
native DOF2_IsSet(file[],key[],tag[]="");
native DOF2_Unset(file[],key[],tag[]="");
native DOF2_FileExists(file[]);
native DOF2_RemoveFile(file[]);
native DOF2_CreateFile(file[],password[]="");
native DOF2_RenameFile(oldfile[],newfile[]);
native DOF2_RenameKey(file[],oldkey[],newkey[],tag[]="");
native DOF2_CopyFile(filetocopy[],newfile[]);
native DOF2_CheckLogin(file[],password[]);
native DOF2_File(user[]);
native DOF2_ParseInt();
native DOF2_ParseFloat();
native DOF2_ParseBool();
native DOF2_ParseBin();
native DOF2_ParseHex();
native DOF2_SetUTF8(bool:set);
native bool:DOF2_GetUTF8();
native DOF2_GetFile();
native DOF2_MakeBackup(file[]);
native DOF2_RemoveSection (file [], tag []);
native DOF2_SectionExists (file [], tag []);
native DOF2_SortSection (file [], tag [], bool: ignorecase = true, bool: ascending = true);
native DOF2_SortAllSections (file [], bool: ignorecase = true, bool: ascending = true);
native DOF2_SetCaseSensitivity (bool: set);
native DOF2_GetCaseSensitivity ();

Atenciosamente,
Falcon.
Reply
#9

Sim vou tentar mais aff cara eu codei um monte ja com isso, o que sera que acontece? Realmente o bini e o fini forao desativados?

@edit pode me passa msn falcon?
Reply
#10

Nunca troque um sistema avanзado por um mais lento, isto pode acarretar mudanзas drбsticas em seu servidor..
Enquanto a o erro, coloque no final das includes
pawn Код:
#if !defined _Float_included
  #tryinclude <float>
#endif
#if !defined _Float_included
#error You no have the include "float".
#endif
Caso aparecer: You no have the include "float"
salve com a extenзгo .INC na sua pasta de includes:

pawn Код:
/* Float arithmetic
 *
 * © Copyright 1999, Artran, Inc.
 * Written by Greg Garner (gmg@artran.com)
 * Modified in March 2001 to include user defined
 * operators for the floating point functions.
 *
 * This file is provided as is (no warranties).
 */

#if defined _Float_included
  #endinput
#endif
#define _Float_included
#pragma library Float

/* Different methods of rounding */
enum floatround_method {
  floatround_round,
  floatround_floor,
  floatround_ceil,
  floatround_tozero,
  floatround_unbiased
}
enum anglemode {
  radian,
  degrees,
  grades
}

/**************************************************/
/* Convert an integer into a floating point value */
native Float:float(value);

/**************************************************/
/* Convert a string into a floating point value */
native Float:floatstr(const string[]);

/**************************************************/
/* Multiple two floats together */
native Float:floatmul(Float:oper1, Float:oper2);

/**************************************************/
/* Divide the dividend float by the divisor float */
native Float:floatdiv(Float:dividend, Float:divisor);

/**************************************************/
/* Add two floats together */
native Float:floatadd(Float:oper1, Float:oper2);

/**************************************************/
/* Subtract oper2 float from oper1 float */
native Float:floatsub(Float:oper1, Float:oper2);

/**************************************************/
/* Return the fractional part of a float */
native Float:floatfract(Float:value);

/**************************************************/
/* Round a float into a integer value */
native floatround(Float:value, floatround_method:method=floatround_round);

/**************************************************/
/* Compare two integers. If the two elements are equal, return 0.
   If the first argument is greater than the second argument, return 1,
   If the first argument is less than the second argument, return -1. */

native floatcmp(Float:oper1, Float:oper2);

/**************************************************/
/* Return the square root of the input value, same as floatpower(value, 0.5) */
native Float:floatsqroot(Float:value);

/**************************************************/
/* Return the value raised to the power of the exponent */
native Float:floatpower(Float:value, Float:exponent);

/**************************************************/
/* Return the logarithm */
native Float:floatlog(Float:value, Float:base=10.0);

/**************************************************/
/* Return the sine, cosine or tangent. The input angle may be in radian,
   degrees or grades. */

native Float:floatsin(Float:value, anglemode:mode=radian);
native Float:floatcos(Float:value, anglemode:mode=radian);
native Float:floattan(Float:value, anglemode:mode=radian);

/**************************************************/
/* Return the absolute value */
native Float:floatabs(Float:value);


/**************************************************/
#pragma rational Float

/* user defined operators */
native Float:operator*(Float:oper1, Float:oper2) = floatmul;
native Float:operator/(Float:oper1, Float:oper2) = floatdiv;
native Float:operator+(Float:oper1, Float:oper2) = floatadd;
native Float:operator-(Float:oper1, Float:oper2) = floatsub;
native Float:operator=(oper) = float;

stock Float:operator++(Float:oper)
    return oper+1.0;

stock Float:operator--(Float:oper)
    return oper-1.0;

stock Float:operator-(Float:oper)
    return oper^Float:cellmin;                  /* IEEE values are sign/magnitude */

stock Float:operator*(Float:oper1, oper2)
    return floatmul(oper1, float(oper2));       /* "*" is commutative */

stock Float:operator/(Float:oper1, oper2)
    return floatdiv(oper1, float(oper2));

stock Float:operator/(oper1, Float:oper2)
    return floatdiv(float(oper1), oper2);

stock Float:operator+(Float:oper1, oper2)
    return floatadd(oper1, float(oper2));       /* "+" is commutative */

stock Float:operator-(Float:oper1, oper2)
    return floatsub(oper1, float(oper2));

stock Float:operator-(oper1, Float:oper2)
    return floatsub(float(oper1), oper2);

stock bool:operator==(Float:oper1, Float:oper2)
    return floatcmp(oper1, oper2) == 0;

stock bool:operator==(Float:oper1, oper2)
    return floatcmp(oper1, float(oper2)) == 0;  /* "==" is commutative */

stock bool:operator!=(Float:oper1, Float:oper2)
    return floatcmp(oper1, oper2) != 0;

stock bool:operator!=(Float:oper1, oper2)
    return floatcmp(oper1, float(oper2)) != 0;  /* "!=" is commutative */

stock bool:operator>(Float:oper1, Float:oper2)
    return floatcmp(oper1, oper2) > 0;

stock bool:operator>(Float:oper1, oper2)
    return floatcmp(oper1, float(oper2)) > 0;

stock bool:operator>(oper1, Float:oper2)
    return floatcmp(float(oper1), oper2) > 0;

stock bool:operator>=(Float:oper1, Float:oper2)
    return floatcmp(oper1, oper2) >= 0;

stock bool:operator>=(Float:oper1, oper2)
    return floatcmp(oper1, float(oper2)) >= 0;

stock bool:operator>=(oper1, Float:oper2)
    return floatcmp(float(oper1), oper2) >= 0;

stock bool:operator<(Float:oper1, Float:oper2)
    return floatcmp(oper1, oper2) < 0;

stock bool:operator<(Float:oper1, oper2)
    return floatcmp(oper1, float(oper2)) < 0;

stock bool:operator<(oper1, Float:oper2)
    return floatcmp(float(oper1), oper2) < 0;

stock bool:operator<=(Float:oper1, Float:oper2)
    return floatcmp(oper1, oper2) <= 0;

stock bool:operator<=(Float:oper1, oper2)
    return floatcmp(oper1, float(oper2)) <= 0;

stock bool:operator<=(oper1, Float:oper2)
    return floatcmp(float(oper1), oper2) <= 0;

stock bool:operator!(Float:oper)
    return (_:oper & cellmax) == 0;

/* forbidden operations */
forward operator%(Float:oper1, Float:oper2);
forward operator%(Float:oper1, oper2);
forward operator%(oper1, Float:oper2);

Espero ter ajudado.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)