26.05.2013, 09:21
Alright, so I get a bunch of errors while coding my own Speedometer. I don't understand what's causing the errors, and let me post them here.
Alright. The line which causes all of those errors are
I already defined the ReadPlayerPosition..
And ReadPositions is also defined through enumerators
I need a solution for them, and if you need the whole code, here you go! (Click the 'here you go' to re-direct to the Pastebin link)
Quote:
error 017: undefined symbol "ReadPlayerPosition" 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 |
Код:
PlayerSpeedDistance = floatsqroot(floatpower(floatabs(floatsub(LPosX,ReadPlayerPosition[i][ReadX])),2)+floatpower(floatabs(floatsub(LPosY,ReadPlayerPosition[i][ReadY])),2)+floatpower(floatabs(floatsub(LPosZ,ReadPlayerPosition[i][ReadZ])),2));
Код:
new ReadPlayerPositions[PLAYERS][ReadPositions];
Код:
enum ReadPositions{Float:ReadX,Float:ReadY,Float:ReadZ}