[Pomoc] Speedo Metar

Započeo Elmedin Techo, April 02, 2012, 22:46:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: Moj GM
Detaljan opis problema: Sve sam pokusao i opet nece :S evo:    warning 235: public function lacks forward declaration (symbol "CheckStatus")
error 012: invalid function call, not a valid address
error 017: undefined symbol "Player"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Dio skripte: //Speedo meter

public CheckStatus()
{
new foreach;
foreach (Player, i)
{
if(IsPlayerInAnyVehicle(i))
{
if(TextShow[i] == false)
{
    TextDrawShowForPlayer(i, Text:Black0);
    TextDrawShowForPlayer(i, Text:Black1);
    TextDrawShowForPlayer(i, Text:Black2);
    TextDrawShowForPlayer(i, Text:Black3);
    TextDrawShowForPlayer(i, Text:LightBlack);
    TextShow[i] = true;
}
        new Float:X, Float:Y, Float:Z, Float:Speed;
        new vehicle = GetPlayerVehicleID(i);
                GetVehicleVelocity(GetPlayerVehicleID(i), X, Y, Z);
                Speed = floatmul(floatsqroot(floatadd(floatadd(floatpower(X, 2), floatpower(Y, 2)),  floatpower(Z, 2))), 100.0);
format(String,sizeof(String),"~b~ [Tabla]~n~~r~Gorivo: ~w~%i~n~~r~km/h: ~w~%i", Gas[vehicle], floatround(Speed*2, floatround_floor));
if(VHSCreated[i] == true)
{
TextDrawDestroy(VHS[i]);
}
VHS[i] = TextDrawCreate(541.000000,137.000000,String);
TextDrawAlignment(VHS[i],0);
TextDrawBackgroundColor(VHS[i],0x000000ff);
TextDrawFont(VHS[i],1);
TextDrawLetterSize(VHS[i],0.259999,1.000000);
TextDrawColor(VHS[i],0xffffffff);
TextDrawSetOutline(VHS[i],1);
TextDrawSetProportional(VHS[i],1);
TextDrawSetShadow(VHS[i],1);
            TextDrawShowForPlayer(i, VHS[i]);
            VHSCreated[i] = true;

}
else
{
    if(TextShow[i] == true)
    {
TextDrawHideForPlayer(i, Text:Black0);
TextDrawHideForPlayer(i, Text:Black1);
TextDrawHideForPlayer(i, Text:Black2);
TextDrawHideForPlayer(i, Text:Black3);
TextDrawHideForPlayer(i, Text:LightBlack);
TextDrawHideForPlayer(i, Text:VHS[i]);
    TextShow[i] = false;
}
}
}
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):
DAJ SREDI MI NEKO TO , KAKO GOD SAM POKUSAO NECE , NEZZ STO !!!!!!!!!!!!!!!!!!!!!!!
Poslednja Izmena: April 02, 2012, 22:48:21 POSLE PODNE od Elmedin Techo


Snich

Elmedine, samo stavi:

forward CheckStatus(); i problem rijesen, jer nemoze da nadje forward od publica i daje error na tu liniju ...

Mr.Gagi

Foreach ne mozes tako definisati (mislim na new foreach;)!
To obrisi i skini include foreach: http://forum.sa-mp.com/showthread.php?t=92679 i dodaj #include <foreach>