Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2014-06-25, 20:02


mrmas







Wiek: 27
Na forum: 4811 dni
Posty: 54
Nick w MP: Michalphs

Piwa: 584

Respekt: 63

Ostrzeżeń: 20%
Siemka edytuje sobie licznik driftu, lecz na pocz?tku s? errory. Za pomoc Browar

Error:

Kod:


error 001: expected token: "-identifier-", but found "-string-"
error 035: argument type mismatch (argument 4)
error 035: argument type mismatch (argument 4)
error 006: must be assigned to an array
error 001: expected token: "-identifier-", but found "-string-"
error 035: argument type mismatch (argument 4)


KOD:

Pawn

forward AngleUpdate();
public AngleUpdate()
{
    for(new g=0;g<200;g++)
    {
        new Float:xFloat:yFloat:z;
        if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), xyz); else GetPlayerPos(gxyz);
        ppos[g][0] = x;
        ppos[g][1] = y;
        ppos[g][2] = z;
    }
}
Float:GetPlayerTheoreticAngle(i)
{
    new Float:sin;
    new Float:dis;
    new Float:angle2;
    new Float:x,Float:y,Float:z;
    new Float:tmp3;
    new Float:tmp4;
    new Float:MindAngle;
    if(IsPlayerConnected(i)){
        GetPlayerPos(i,x,y,z);
        dis floatsqroot(floatpower(floatabs(floatsub(x,ppos[i][0])),2)+floatpower(floatabs(floatsub(y,ppos[i][1])),2));
        if(IsPlayerInAnyVehicle(i))GetVehicleZAngle(GetPlayerVehicleID(i), angle2); else GetPlayerFacingAngle(iangle2);
        if(x>ppos[i][0]){tmp3=x-ppos[i][0];}else{tmp3=ppos[i][0]-x;}
        if(y>ppos[i][1]){tmp4=y-ppos[i][1];}else{tmp4=ppos[i][1]-y;}
        if(ppos[i][1]>&& ppos[i][0]>x){ //1
            sin asin(tmp3/dis);
            MindAngle floatsub(floatsub(floatadd(sin90), floatmul(sin2)), -90.0);
        }
        if(ppos[i][1]<&& ppos[i][0]>x){ //2
            sin asin(tmp3/dis);
            MindAngle floatsub(floatadd(sin180), 180.0);
        }
        if(ppos[i][1]<&& ppos[i][0]<x){ //3
            sin acos(tmp4/dis);
            MindAngle floatsub(floatadd(sin360), floatmul(sin2));
        }
        if(ppos[i][1]>&& ppos[i][0]<x){ //4
            sin asin(tmp3/dis);
            MindAngle floatadd(sin180);
        }
    }
    if(MindAngle == 0.0){
        return angle2;
    } else
    


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 20:32


JotP







Wiek: 26
Na forum: 4821 dni
Posty: 217

Piwa: 1215

Respekt: 44,6

Ostrzeżeń: 40%
A podasz dok?adne linijki? Nie chc? mi si? szukac.

Podpis
3guzqx
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-06-25, 20:39


mrmas







Wiek: 27
Na forum: 4811 dni
Posty: 54
Nick w MP: Michalphs

Piwa: 584

Respekt: 63

Ostrzeżeń: 20%
Pawn

new Float:xFloat:yFloat:z; - error 001expected token"-identifier-"but found "-string-"

if(IsPlayerInAnyVehicle(g))GetVehiclePos(GetPlayerVehicleID(g), xyz); else GetPlayerPos(gxyz); - error 035argument type mismatch (argument 4)


ppos[g][2] = z; - error 006must be assigned to an array

//Float:GetPlayerTheoreticAngle(i)


new Float:x,Float:y,Float:z; - error 001expected token"-identifier-"but found "-string-"

GetPlayerPos(i,x,y,z); - GetPlayerPos(i,x,y,z);


Postaw piwo autorowi tego posta
 

 
Tagi: licznik :: drift
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku