GTAMulti - GTA Türkiye

San Andreas Multiplayer => Yardım Talepleri => PAWN Kodlama => Kilitli Konular => Konuyu başlatan: Codes. - 18 Ocak 2019, 13:38:04

Başlık: Yarış Sistemi Modu İle Alakalı Bir Hata
Gönderen: Codes. - 18 Ocak 2019, 13:38:04
Hata;

PAWN Kodu: Seç
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(78) : error 021: symbol already defined: "RaceInfo"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(79) : error 021: symbol already defined: "currentraceslot"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(85) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(119) : error 021: symbol already defined: "myfirstrace"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(346) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(347) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(348) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(603) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(723) : error 010: invalid function or declaration
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(749) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(750) : error 017: undefined symbol "racename"
D:\OpErAsYoN - Hırsız Polis v1.0\Operasyon Racing v1.0 #farklıbirdeneyim\filterscripts\dRace.pwn(751) : error 017: undefined symbol "racename"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


12 Errors.


Hata Veren Satırlar;

PAWN Kodu: Seç
(78) : new RaceInfo[MAX_RACES][rInfo];
(79) : new currentraceslot;
(85): format(RaceInfo[currentraceslot][racename], 100, "%s", RaceName);
85 inci satırın Tam Kodu;


PAWN Kodu: Seç
stock CreateRace(RaceName[], RaceTimeout, RaceVehicle = -1)
{
    format(RaceInfo[currentraceslot][racename], 100, "%s", RaceName);
    RaceInfo[currentraceslot][racetimeout] = RaceTimeout;
    RaceInfo[currentraceslot][racevehicle] = RaceVehicle;
    RaceInfo[currentraceslot][racerunning] = false;
    RaceInfo[currentraceslot][racejoinable] = false;
    return currentraceslot, currentraceslot ++;
}


PAWN Kodu: Seç
(119) : new myfirstrace = CreateRace("Drag race", 300);
PAWN Kodu: Seç
(346, 347, 348) :     if(RaceInfo[raceid][racevehicle] == -1) format(RaceStr, sizeof(RaceStr), "[RACE] The Race  %s  will start in %d seconds. Type /joinrace %d to join!", RaceInfo[raceid][racename], WAIT_RACE, raceid);
    if(RaceInfo[raceid][racevehicle] > 0) format(RaceStr, sizeof(RaceStr), "[RACE] The Race  %s  will start in %d seconds. Type /joinrace %d to join! A %s is required for this race.", RaceInfo[raceid][racename], WAIT_RACE, raceid, VehicleNames[RaceInfo[raceid][racevehicle]-400]);
    if(RaceInfo[raceid][racevehicle] == 0) format(RaceStr, sizeof(RaceStr), "[RACE] The Race  %s  will start in %d seconds. Type /joinrace %d to join! This is a onfoot race only.", RaceInfo[raceid][racename], WAIT_RACE, raceid);


(603) :     
PAWN Kodu: Seç
if(!strlen(RaceInfo[listitem][racename])) return SendClientMessage(playerid, 0xFF0000, "Race ID is not valid");

PAWN Kodu: Seç
603 ün tam kodu;

PAWN Kodu: Seç
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 13337 && response != 0)
    {
        if(currentraceslot < listitem) return SendClientMessage(playerid, 0xFF0000, "Race ID is not valid");
        if(!strlen(RaceInfo[listitem][racename])) return SendClientMessage(playerid, 0xFF0000, "Race ID is not valid");
        if(RaceInfo[listitem][racejoinable] == false && RaceInfo[listitem][racerunning] == false && InRace[playerid] == -1) OpenRace(listitem);
        JoinRace(playerid, listitem);
    }
    return 0;
}


PAWN Kodu: Seç
(723) :     return string;

PAWN Kodu: Seç
723 ün Tam Kodu;

PAWN Kodu: Seç
stock ReturnTime(timevariable)
{
    new milliseconds = timevariable, seconds, minutes, string[20];
    while(milliseconds > 9)
    {
        seconds ++;
        milliseconds = milliseconds - 10;
    }
    while(seconds > 59)
    {
        minutes ++;
        seconds = seconds - 60;
    }
        format(string, sizeof(string), "%d:%02d.%03d
", minutes, seconds, milliseconds);
    }
    return string;
}


PAWN Kodu: Seç
(749, 750, 751) :  if(RaceInfo[x][racejoinable] == true) format(RaceInfoString, sizeof(RaceInfoString), "%s%s(ID:%d) {00FF00}[RACE JOINABLE]{FFFFFF}\n", RaceInfoString, RaceInfo[x][racename], x);
        else if(RaceInfo[x][racerunning] == true) format(RaceInfoString, sizeof(RaceInfoString), "%s%s(ID:%d) {FF0000}[RACE RUNNING]{FFFFFF}\n", RaceInfoString, RaceInfo[x][racename], x);
        else format(RaceInfoString, sizeof(RaceInfoString), "%s%s(ID:%d) \n", RaceInfoString,
RaceInfo[x][racename], x);
[/pawn]

PAWN Kodu: Seç
749, 750, 751 Tam Kod;

PAWN Kodu: Seç
CMD:races(playerid, params[])
{
    new RaceInfoString[600];
    for(new x; x<currentraceslot; x++)
    {
        if(RaceInfo[x][racejoinable] == true) format(RaceInfoString, sizeof(RaceInfoString), "%s%s(ID:%d) {00FF00}[RACE JOINABLE]{FFFFFF}\n", RaceInfoString, RaceInfo[x][racename], x);
        else if(RaceInfo[x][racerunning] == true) format(RaceInfoString, sizeof(RaceInfoString), "%s%s(ID:%d) {FF0000}[RACE RUNNING]{FFFFFF}\n", RaceInfoString, RaceInfo[x][racename], x);
        else format(RaceInfoString, sizeof(RaceInfoString), "%s%s(ID:%d) \n", RaceInfoString, RaceInfo[x][racename], x);
    }
    ShowPlayerDialog(playerid, 13337, DIALOG_STYLE_LIST, "Races", RaceInfoString, "Join", "Cancel");
    return 1;
}