Import data from a file into a enum/array - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Import data from a file into a enum/array (
/showthread.php?tid=152968)
Import data from a file into a enum/array -
lolumadd - 06.06.2010
Hey, right now I got some code that looks like this:
pawn Код:
new CarInfo[MAX_CARS][cInfo] = {
{0, "BLISTA COMPACT", 496, 1, 50, 65, 10000},
Im going to have a file that looks like this:
pawn Код:
0, "BLISTA COMPACT", 496, 1, 50, 65, 10000
1, "PHOENIX", 603, 1, 60, 50, 10000
When I get the data from the file, how can I import it into an array like
Код:
new CarInfo[MAX_CARS][cInfo]
so I can properly use it.