Whats wrong?
#1

Hello, I get some errors on this code:

pawn Код:
Float:functionB0(Float:arg0, Float:arg1, arg2)
{
    new Float:var0[4];
    for(new var1 = 0; var1 < 3; var1++)
    {
        var0[var1] = arg0[var1] - arg1[var1];
        var0[var1] = var0[var1] * var0[var1];
    }
    var0[3] = var0[0] + var0[1] + var0[2];
    return (arg2 ? floatsqroot(var0[3]) : var0[3]);
}
This is the errors :
Код:
error 028: invalid subscript (not an array or too many subscripts): "arg0"
Warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
This is the line:

pawn Код:
var0[var1] = arg0[var1] - arg1[var1];
i dont get whats wrong :S it has a ; sign on the end.
Reply
#2

You created the float "arg0" for functionB0 without any array.
Reply
#3

no thats not it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)