Geplaatst: 26 juni 201311 jaren comment_2051980 Ik krijg 1 melding niet weg C:\Program Files\Rockstar Games\gamemodes\gmd.pwn(1684) : error 033: array must be indexed (variable "string") new rNameFile [128]; format(rNameFile, sizeof(rNameFile), "/rRaceSystem/RaceNames/RaceNames.txt"); format(string, sizeof(string), "Race_%d", dini_Get(rNameFile, string)); if(string == "Race_5") // regel 1684 { Position = 0; FinishCount = 0; JoinCount = 0; Loop(x, 2) PlayersCount[x] = 0; Joined[playerid] = true; CountAmount = COUNT_DOWN_TILL_RACE_START; RaceTime = MAX_RACE_TIME_LONG; RaceBusy = 0x01; TimeProgress = 0; SetupRaceForPlayer(playerid); CountTimer = SetTimer("CountTillRace", 999, 1); } else { Position = 0; FinishCount = 0; JoinCount = 0; Loop(x, 2) PlayersCount[x] = 0; Joined[playerid] = true; CountAmount = COUNT_DOWN_TILL_RACE_START; RaceTime = MAX_RACE_TIME; RaceBusy = 0x01; TimeProgress = 0; SetupRaceForPlayer(playerid); CountTimer = SetTimer("CountTillRace", 999, 1); } return 1; } de rode tekst is regel 1684 kan iemand mij hier mee helpen? Bewerkt: 27 juni 201311 jaren door VWO-er code in codebox gezet (er staat een comment bij de foute regel)
Geplaatst: 27 juni 201311 jaren comment_2052175 Je kan helaas niet zomaar twee strings vergelijken in pawn. Je zal het via de functie "strcmp" moeten doen. Die lijn zal dus als volgt worden: if(!strcmp(string, "Race_5"))
Ik krijg 1 melding niet weg
C:\Program Files\Rockstar Games\gamemodes\gmd.pwn(1684) : error 033: array must be indexed (variable "string")
de rode tekst is regel 1684
kan iemand mij hier mee helpen?
Bewerkt: door VWO-er
code in codebox gezet (er staat een comment bij de foute regel)