error : error 010: invalid function or declaration help
#1

its giving me error,
PHP код:
 error 010invalid 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(filestring);
            
split(stringbinfo'|');
            
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

Reply
#2

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
}
Reply
#3

----
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)