Major Float.inc error
#1

This is what I get when I use rcon commands.
Код:
Console input: reloadbans
[13:19:43] 
[13:19:43] [debug] Run time error 4: "Array index out of bounds"
[13:19:43] [debug]  Accessing element at index 1 past array upper bound 137
[13:19:43] [debug] AMX backtrace:
[13:19:43] Ban list
[13:19:43] --------
[13:19:43]  Loaded: samp.ban
[13:19:43] 
[13:19:43] [debug] #0 00000008 in Float:operator-(Float:) (Float:oper=0.00000) at E:\Users\User\Desktop\SAMP\pawno\include\float.inc:108
[13:19:43] [debug] Run time error 4: "Array index out of bounds"
[13:19:43] [debug]  Accessing element at index 1 past array upper bound 137
[13:19:43] [debug] AMX backtrace:
[13:19:43] [debug] #0 00000008 in Float:operator-(Float:) (Float:oper=0.00000) at E:\Users\User\Desktop\SAMP\pawno\include\float.inc:108
Other error
Код:
Console input: reloadbans
[13:58:23] 
[13:58:23] [debug] Run time error 10: "Native function failed"
108 line:
pawn Код:
stock Float:operator-(Float:oper)//108
    return oper^Float:cellmin;                  /* IEEE values are sign/magnitude */

It happens whenever I use OnRconCommand callback in some filterscript aka when I enable that callback
Quote:

You will need to include this callback in a loaded filterscript for it to work in the gamemode!

https://sampwiki.blast.hk/wiki/OnRconCommand
Reply
#2

Hi, You helped me earlier and I want to pay that favour back. The float.inc file you have has been edited or you have a linux version. If it isn't that check all your other callbacks to see if they aren't somehow linked (like they use the same formula to generate something different) if so, re-script or remove that callback. Tell me what errors you get after doing one of the above.
Reply
#3

The error is obviously not in float.inc, but in your code
Код:
stock Float:operator-(Float:oper)//108
    return oper^Float:cellmin;                  /* IEEE values are sign/magnitude */
I have no clue what it is supposed to do, but I do know that it is triggered on OnRconCommand, and that it crashes your server.

EDIT:
You are probably use the - operator with floats somewhere in your OnRconCommand, but it gives results past the float limit
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)