Raised This Month: $32 Target: $400
 8% 

[BUG] PAWN fails???


  
 
 
Thread Tools Display Modes
Author Message
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 01-19-2007 , 09:22   [BUG] PAWN fails???
#1

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?

Last edited by Simon Logic; 01-19-2007 at 09:34.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
Minimum
Senior Member
Join Date: Jun 2006
Old 01-19-2007 , 12:18   Re: [BUG] PAWN fails???
#2

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...

Last edited by Minimum; 01-19-2007 at 12:26.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 01-19-2007 , 12:32   Re: [BUG] PAWN fails???
#3

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]
Simon Logic is offline
Send a message via Skype™ to Simon Logic
|POW|Da_ghost
Senior Member
Join Date: Nov 2006
Location: http://snarkcafe.net
Old 01-19-2007 , 12:40   Re: [BUG] PAWN fails???
#4

I can confirm this.
Its really wierd.
__________________
If you want me to help you with something please contact me on msn or xfire(Daghost1337)
|POW|Da_ghost is offline
Send a message via AIM to |POW|Da_ghost Send a message via MSN to |POW|Da_ghost
Old 01-19-2007, 13:49
BAILOPAN
This message has been deleted by BAILOPAN.
BAILOPAN
Join Date: Jan 2004
Old 01-19-2007 , 13:56   Re: [BUG] PAWN fails???
#5

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.
__________________
egg
BAILOPAN is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 01-19-2007 , 18:19   Re: [BUG] PAWN fails???
#6

Yes, it does.
Simon Logic is offline
Send a message via Skype™ to Simon Logic
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-20-2007 , 00:35   Re: [BUG] PAWN fails???
#7

This is actually pretty old:
http://forums.alliedmods.net/showpos...4&postcount=18
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 01-20-2007 , 10:19   Re: [BUG] PAWN fails???
#8

I wonder when and why this hack stopped wokring...
__________________
hello, i am pm
PM is offline
BAILOPAN
Join Date: Jan 2004
Old 01-20-2007 , 13:21   Re: [BUG] PAWN fails???
#9

PM: I yam just as mystified as you
__________________
egg
BAILOPAN is offline
sawce
The null pointer exception error and virtual machine bug
Join Date: Oct 2004
Old 02-19-2007 , 03:12   Re: [BUG] PAWN fails???
#10

This is fixed in revision 3336
sawce is offline
 


Thread Tools
Display Modes

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 01:25.


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