AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   (OLD) Bug Reports (https://forums.alliedmods.net/forumdisplay.php?f=24)
-   -   [BUG] PAWN fails??? (https://forums.alliedmods.net/showthread.php?t=50089)

Simon Logic 01-19-2007 09:22

[BUG] PAWN fails???
 
Please execute this one:
Code:
#include <amxmodx> public plugin_init() {     new arr[0] = {1}     new Float:farr[0] = {1.0}     new inv     new Float:finv     inv = -arr[0]       finv = -farr[0]     log_amx("%d; %f", inv, finv) }

Output:
Code:

L 01/19/2007 - 16:31:42: [test_bug.amxx] -1; 1.00000
What a hell with Float calculations?

Minimum 01-19-2007 12:18

Re: [BUG] PAWN fails???
 
Code:
#include <amxmodx> public plugin_init() {     new arr[0] = {1}     new Float:farr[0] = {1.0}     new inv     new Float:finv     inv = -arr[0]       finv = -farr[0]     log_amx("%i; %f", inv, finv) }

Code:
#include <amxmodx> public plugin_init() {     new arr = 1     new Float:farr = 1.0     new inv     new Float:finv         inv = -arr     finv = -farr     log_amx("%i; %f", inv, finv) }

Code:

L 01/19/2007 - 08:34:43: [testfunc.amxx] -1; 1.000000
None of these work either...

Simon Logic 01-19-2007 12:32

Re: [BUG] PAWN fails???
 
Don't understand what you mean. It should BE fixed? Yeah, it SHOULD! But it can be an interpreter error.

By now workaround is
Code:
finv = 0.0-farr[0] // or even finv = -1.0*farr[0]

|POW|Da_ghost 01-19-2007 12:40

Re: [BUG] PAWN fails???
 
I can confirm this.
Its really wierd.

BAILOPAN 01-19-2007 13:56

Re: [BUG] PAWN fails???
 
Open your float.inc file and find this block:

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

Replace it with this:
Code:
stock Float:operator-(Float:oper)     return oper^Float:cellmin;                  /* IEEE values are sign/magnitude */

See if that fixes it.

Simon Logic 01-19-2007 18:19

Re: [BUG] PAWN fails???
 
Yes, it does.

XxAvalanchexX 01-20-2007 00:35

Re: [BUG] PAWN fails???
 
This is actually pretty old:
http://forums.alliedmods.net/showpos...4&postcount=18

PM 01-20-2007 10:19

Re: [BUG] PAWN fails???
 
I wonder when and why this hack stopped wokring...

BAILOPAN 01-20-2007 13:21

Re: [BUG] PAWN fails???
 
PM: I yam just as mystified as you :x

sawce 02-19-2007 03:12

Re: [BUG] PAWN fails???
 
This is fixed in revision 3336


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

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