View Full Version : Need some help

18/05/2012, 12:27 PM
At First , Hello All! So here is my problem:

I have Cars.cfg in scriptfiles/cars.cfg , and I have my cars there , the cars load from that file but the problem is that there are 137 total cars but only 78 laod correctly and appear, the rest does not appear in the game. Any help will be appreciated and will give +REP.

Thanks in advance!

18/05/2012, 12:29 PM
load it like this

public OnGameModeInit()
new string[64]; // Create the string to store the read text in
new File:example = fopen("cars.txt", io_read); // Open the file
fread(example, string); // Fread from the file and store what's read in 'string'
fclose(example); // Close the file
printf("%s",string); // Print what was read
return 1;

18/05/2012, 12:31 PM
That is exactly the way it actually loads.. I'm already loading it like that!

18/05/2012, 12:35 PM
Check car id 79 in the file..
Might be a corrupted file with like an invalid car model/color

18/05/2012, 12:36 PM
Checked it.. All of them are correct..

18/05/2012, 12:37 PM
Checked it.. All of them are correct..

What does car ID 79 look like? In the file I mean

18/05/2012, 12:40 PM
It's like this:

411,1658.059204,-1094.024658,23.706249,270.000000,1,1,Dealership,In fernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
411,1657.703002,-1085.105834,23.706249,270.000000,1,1,Dealership,In fernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
411,1657.813476,-1080.509887,23.698436,270.000000,1,1,Dealership,In fernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
411,1657.969726,-1089.283203,23.706249,270.000000,1,1,Dealership,In fernus,150000,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

18/05/2012, 12:40 PM
Checked it.. All of them are correct..

try making 2 files one for the firse 70 then another for the rest then try load both, and see what happens

18/05/2012, 12:41 PM
I dont get this part:

"new string[64]"

Why make a stinr gfor 150 cars only 64 bits big?

18/05/2012, 12:47 PM
2 files or more didn't work.. the same thing