error : error 010: invalid function or declaration help - 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)
+--- Thread: error : error 010: invalid function or declaration help (
/showthread.php?tid=571050)
error : error 010: invalid function or declaration help -
Rabea - 15.04.2015
its giving me error,
PHP код:
: error 010: invalid function or declaration
What's the problem?
its at return 1;
PHP код:
stock LoadVehs()
{
new vehinfo[21][32];
new string[256];
new File:file = fopen("vehs.cfg", io_read);
if(file)
{
new idx = 1;
while(idx < MAX_VEHS)
{
fread(file, string);
split(string, binfo, '|');
HouseInfo[idx][vehModel] = strval(vehinfo[0]);
format(HouseInfo[idx][vehOwner], 32, "%s", vehinfo[1]);
VehicleInfo[idx][vehX] = floatstr(vehinfo[2]);
VehicleInfo[idx][vehY] = floatstr(vehinfo[3]);
VehicleInfo[idx][vehZ] = floatstr(vehinfo[4]);
VehicleInfo[idx][vehR] = strval(vehinfo[5]);
CreateVehicle(VehicleInfo[idx][vehModel],VehicleInfo[idx][vehX], VehicleInfo[idx][vehY],VehicleInfo[idx][vehZ],VehicleInfo[idx][vehR]);
}
idx++;
}
}
return 1; // this line
}
Re: error : error 010: invalid function or declaration help -
d3ll - 15.04.2015
You have an additional closing bracket.
pawn Код:
stock LoadVehs()
{
new vehinfo[21][32], string[256], File:file = fopen("vehs.cfg", io_read);
if(file)
{
new idx = 1;
while(idx < MAX_VEHS)
{
fread(file, string);
split(string, binfo, '|');
HouseInfo[idx][vehModel] = strval(vehinfo[0]);
format(HouseInfo[idx][vehOwner], 32, "%s", vehinfo[1]);
VehicleInfo[idx][vehX] = floatstr(vehinfo[2]);
VehicleInfo[idx][vehY] = floatstr(vehinfo[3]);
VehicleInfo[idx][vehZ] = floatstr(vehinfo[4]);
VehicleInfo[idx][vehR] = strval(vehinfo[5]);
CreateVehicle(VehicleInfo[idx][vehModel],VehicleInfo[idx][vehX], VehicleInfo[idx][vehY],VehicleInfo[idx][vehZ],VehicleInfo[idx][vehR]);
}
idx++;
}
return 1; // this line
}
Re: error : error 010: invalid function or declaration help -
Darrenr - 15.04.2015
----
Re: error : error 010: invalid function or declaration help -
_GHT_MarK445 - 15.04.2015
Quote:
Originally Posted by Darrenr
----
|
Please read the rules of the forum and write messages, that do make sense. Messages like you just wrote are corrupting the rules.