Errors while coding Speedometer - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Errors while coding Speedometer (
/showthread.php?tid=439630)
Errors while coding Speedometer -
Dzines4SAMP - 26.05.2013
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.
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
|
Alright. The line which causes all of those errors are
Код:
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));
I already defined the ReadPlayerPosition..
Код:
new ReadPlayerPositions[PLAYERS][ReadPositions];
And ReadPositions is also defined through enumerators
Код:
enum ReadPositions{Float:ReadX,Float:ReadY,Float:ReadZ}
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)
Re: Errors while coding Speedometer -
park4bmx - 26.05.2013
You can't do the
ReadPositions like that
Make them into a stock with a return function!