error 076: syntax error in the expression, or invalid function call = HELP!
#1

pawn Код:
(9890) : error 076: syntax error in the expression, or invalid function call
pawn Код:
(9890) : VehiclePos[freeid] = SpawnCarAtHouse;
pawn Код:
stock SpawnCarAtHouse(playerid , freeid)
{
    new str1[256],pname[24],str[256];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(str1, sizeof(str1), "Houses/HOwnersID/%s.ini", udb_encode(pname));
    if (dini_Exists(str1))
    {
        if(dini_Int(str1,"Houseid")!=-255)
        {
            new Float:x,Float:y,Float:z;
            str = dini_Get(str1,"SpawnInt");
            x = dini_Float(str1,"SpawnX");
            y = dini_Float(str1,"SpawnY");
            z = dini_Float(str1,"SpawnZ");
            new free2 = GetVehicleID(freeid);
            SetVehiclePos(free2, x+4, y+4, z);
       
        }
    }
    return 1;
}
Reply
#2

pawn Код:
VehiclePos[freeid] = SpawnCarAtHouse(playerid, freeid);
Try this... The stock has as parameters "playerid" and "freeid"
Reply
#3

You are missing parameters in your function. And VehiclePos will be always equal to 1 since you are returning only one in your stock function.
Reply
#4

i get error on
pawn Код:
VehiclePos[freeid] = SpawnCarAtHouse(playerid, freeid);
Error :
pawn Код:
error 033: array must be indexed (variable "VehiclePos")
Reply
#5

PHP код:
VehiclePos[VariableOfCar][freeid
Exemple
PHP код:
new freecarGetPlayerVehicleID(freeid); 
PHP код:
VehiclePos[freecar][freeid
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)