22.07.2010, 03:17
Hi people!
First sry for my bad English.
I wanted to create a function in which strings are getting "returned" like in split-func, look at my function:
and this function should be used somewhere in the script:
but on compiling they are these errors:
I don't know what I do wrong, I have looked 1000 times at the split function, but I didn't found an error
Edit: I wrote the third argument in error lines as 30 (strcat(arg1,arg2,30)). But I don't know how to delete my own post, only can edit it?!
First sry for my bad English.
I wanted to create a function in which strings are getting "returned" like in split-func, look at my function:
Code:
forward ListGoods(checkpointid,bool:tanktrailer,Field[][],goods);
public ListGoods(checkpointid,bool:tanktrailer,Field[][],goods)
{
new exports,data[30];
MySQLCheckConnection();
exports=CompanyInfo[checkpointid][companyexports];
if(tanktrailer==false)
{
new count=0;
for(new i=1;i<=exports;i++)
{
switch(i)
{
case 1: {strcat(data,CompanyInfo[checkpointid][name_export1]);}
case 2: {strcat(data,CompanyInfo[checkpointid][name_export2]);}
case 3: {strcat(data,CompanyInfo[checkpointid][name_export3]);}
case 4: {strcat(data,CompanyInfo[checkpointid][name_export4]);}
}
if(strcmp(data,"Benzin",true) and strcmp(data,"Motorцl",true))
{
count++;
strcat(Field[count],data); // 1262
print(Field[count]);
print(data);
}
}
goods=count;
}
else
{
new count=0;
for(new i=1;i<=exports;i++)
{
switch(i)
{
case 1: {strcat(data,CompanyInfo[checkpointid][name_export1]);}
case 2: {strcat(data,CompanyInfo[checkpointid][name_export2]);}
case 3: {strcat(data,CompanyInfo[checkpointid][name_export3]);}
case 4: {strcat(data,CompanyInfo[checkpointid][name_export4]);}
}
if(strcmp(data,"Benzin",true) and strcmp(data,"Motorцl",true))
{
count++;
strcat(Field[count],data); // 1284
print(Field[count]);
print(data);
}
}
goods=count;
}
}
Code:
new ladung[6][30],ladungen,string[256]; ListGoods(checkpointid,false,ladung,ladungen);
Code:
(1262) : warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength") (1284) : warning 224: indeterminate array size in "sizeof" expression (symbol "maxlength")
Edit: I wrote the third argument in error lines as 30 (strcat(arg1,arg2,30)). But I don't know how to delete my own post, only can edit it?!

