error 010: invalid function or declaration
#1

Line: 187 : error 010: invalid function or declaration

Here is that line:
pawn Код:
new Float:sva[MAX_PLAYERS];
But I don't know what's up with it?
Reply
#2

Show us the block of code around it.
Reply
#3

That can't be the problem since this vairable looks okay, so you might have forgot to close a bracket or accidenlty added one and it causes a problem.
Reply
#4

Hmmm, I will post all the areas that this code is in, hold up, I will edit this post:

pawn Код:
public speedometer(playerid) {
    GetVehicleVelocity(GetPlayerVehicleID(playerid), sva[playerid], svb[playerid], svc[playerid]);
    svd[playerid] = floatsqroot(((sva[playerid]*sva[playerid])+(svb[playerid]*svb[playerid]))+(svc[playerid]*svc[playerid]))*100;
    s2[playerid] = floatround(svd[playerid],floatround_round);
    format(s3[playerid],256,"%i MPH", s2[playerid]);
    TextDrawSetString(sdisplay[playerid], s3[playerid]);
    return 1;
}
That is just it, apart from the variable at the top, which you've seen.
Reply
#5

You got it all defined for sure?

pawn Код:
#include    "a_samp"

new
    Float:sva[MAX_PLAYERS],
    Float:svb[MAX_PLAYERS],
    Float:svc[MAX_PLAYERS];

public speedometer(playerid)
{
    GetVehicleVelocity(GetPlayerVehicleID(playerid), sva[playerid], svb[playerid], svc[playerid]);
    svd[playerid] = floatsqroot(((sva[playerid]*sva[playerid])+(svb[playerid]*svb[playerid]))+(svc[playerid]*svc[playerid]))*100;
    s2[playerid] = floatround(svd[playerid],floatround_round);
    format(s3[playerid], sizeof(64), "%i MPH", s2[playerid]);
    TextDrawSetString(sdisplay[playerid], s3[playerid]);
    return true;
}
If yes and you have still error.. i'll give you a better way to make Speedometer.
Reply
#6

It still gave errors, please could you show me? PM it to me?, thanks.
Reply
#7

Sended..
Reply
#8

Show the code around this line:

pawn Код:
new Float:sva[MAX_PLAYERS];
Reply
#9

I helped him on PM. Topic is ended
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)