are you using elgan's script to split lines? Perhaps take a good look at the elgan's split_line description or take a look at my similar script:
well I was looking foe elgan's script but didn't found it, so I made my own to fix my problem, here it is:
Code: Select all
string_splitter local.mystring local.word_num:
local.splitter = " "
local.temp_data = 0
local.words_count = 0
local.temp_data1 = 0
for(local.i = 0; local.i <= ((local.mystring.size) - 1); local.i++)
{
local.o = (local.i - 1)
if(local.i <= 0)
local.o = 0
if(local.mystring[local.o] == local.splitter && local.mystring[local.i] != local.splitter)
{
local.words_count++
if (local.words_count == local.word_num)
{
for(local.e = local.i ; local.e <= ((local.mystring.size) - 1); local.e++)
{
if(local.mystring[local.e] != local.splitter)
{
local.myword[local.temp_data1] = local.mystring[local.e]
local.temp_data1++
}
if(local.mystring[local.e] == local.splitter)
{
end local.myword
}
}
}
}
if(local.i == 0 && local.mystring[local.i] != local.splitter)
{
local.words_count++
if (local.words_count == local.word_num)
{
for(local.e = local.i ; local.e <= ((local.mystring.size) - 1); local.e++)
{
if(local.mystring[local.e] != local.splitter)
{
local.myword[local.temp_data1] = local.mystring[local.e]
local.temp_data1++
}
if(local.mystring[local.e] == local.splitter)
{
end local.myword
}
}
}
}
}
end local.myword
it's working good. the first time I tryed to use multidimensional arrays, but these I couldn't be able to return them..so I0ve made it using the word number, in fact I have to make a for cicle to get the full string splitted into multid. arrays, as shown:
Code: Select all
for(local.i = 1; local.i <= local.total_maps; local.i++)
{
local.word_num = local.i
local.map_list_map_num[local.i] = waitthread global/string_splitter.scr::string_splitter local.mystring local.word_num
}
however the scr works, and give no console errors, so I really don't get the problem...
It cannot be NULL, it must be NIL
I really don't know, becouse if it's NIL or NULL it still should be printed as NIL or NULL in console when I use printing functions! But nothing appeard on it, seems like the it has not been exec the printing section!! do you see what I mean?
however, the one of next map is a particular case becouse I had to change the scr I've posted couse of some lake! but the problem still came up in all if statement, when I compare the array that contains the map one by one of the maplist, with a string var as can be local.map!