24.06.2012, 09:53
Hello,
I am working on a property script, and have made a function, but it does not compile,
I am trying to make it so that it returns "Nobody"
This is the error I am receiving:
although if i delete "return str" the error goes away.
It is really doing my head in, if anyone could help i would appreciate it.
I am working on a property script, and have made a function, but it does not compile,
I am trying to make it so that it returns "Nobody"
pawn Код:
stock GetPropertyOwnerName(property[])
{
new file[256],name[24];
format(file,sizeof(file),"gamemode/config/properties/%s.txt",property);
if(strcmp(dini_Get(file,"Property_Owner"),"AnUnusableSA-MPName"))
{
new str[7] = "Nobody";
return str;
}
format(name,sizeof(name),"%s",dini_Get(file,"Property_Owner"));
return name;//line 235
}
Код:
(235) : error 047: array sizes do not match, or destination array is too small
It is really doing my head in, if anyone could help i would appreciate it.