LoadPortals from INI (LOTF HELP)

05/08/2010 23:59 scottdavey#1
Fixed, read last page.
05/09/2010 00:18 Basser#2
Send me the .ini file file and also can you tell me what line is line 1173?
05/09/2010 00:23 scottdavey#3
fixed.
05/09/2010 02:58 ChingChong23#4
show us where Portals[] is defined.
05/09/2010 21:33 scottdavey#5
fixed.
05/10/2010 19:18 scottdavey#6
Bump, need help so I can move on.
05/10/2010 21:40 Korvacs#7
You have defined an array but never populated it.

You need to do something like:

Code:
public static ushort[][] Portals = new ushort[1][1];
But obviously more than 1x1 in size.
05/10/2010 22:21 scottdavey#8
Quote:
Originally Posted by Korvacs View Post
You have defined an array but never populated it.

You need to do something like:

Code:
public static ushort[][] Portals = new ushort[1][1];
But obviously more than 1x1 in size.
I'm just using the default lotf variables, when i add the code you posted i get errors,

any ideas?
05/10/2010 22:25 Korvacs#9
Where were the portals loaded previously?
05/10/2010 22:35 scottdavey#10
Fixed.
05/10/2010 22:38 Korvacs#11
Ah there:

Code:
 Portals = new ushort[PortalsC][];
You will need to be storing the portal count in your .ini file somewhere, and then populate the Portal array accordinly.
05/10/2010 22:47 scottdavey#12
Fixed.
05/10/2010 22:56 Korvacs#13
Make:

Code:
currentid++;
The last thing you do in your foreach loop.
05/10/2010 23:04 scottdavey#14
Quote:
Originally Posted by Korvacs View Post
Make:

Code:
currentid++;
The last thing you do in your foreach loop.
Works man, thank you very much!

Really appreciate it!
05/10/2010 23:15 Basser#15
Korvacs proved my thought right before I could do it. =(