INI_WriteString help
#1

I've been trying to find a way to record the owner of the vehicle but keep getting errors such as
error 035: argument type mismatch (argument 3)

Код:
INI_String("Owner",VehicleInfo[idx][vOwner], 24);

new name[24];
format(name, sizeof(name), GetName(playerid));
INI_WriteString(File,"Owner", VehicleInfo[vehID][vOwner] = name);

stock GetName(playerid)
{
    new name[24];
    GetPlayerName(playerid, name, 24);
    if(playerid == INVALID_PLAYER_ID)
        name = "Disconnected / Offline";
    return name;
}
This is all I think you need to see. If anyone could help it'd be much appreciated so I can move on with my script.
Reply
#2

try;


pawn Код:
INI_WriteString(File,"Owner", VehicleInfo[vehID][vOwner]);
Reply
#3

That doesn't work seeing as it has nothing to write as the owner.
Reply
#4

did you at least test it ? the owner variable has to be set before saving it, then it goes automaticly and you wont need the = name part you had.

It works for me , do you have any errors ?
Reply
#5

Quote:
Originally Posted by AIped
Посмотреть сообщение
did you at least test it ? the owner variable has to be set before saving it, then it goes automaticly and you wont need the = name part you had.

It works for me , do you have any errors ?
I tested it, yes. It returns nothing as the owner.
Reply
#6

hmm...under wich public do you save ?

EDIT: after writing you need INI_Close(File); did you do that too ?
Reply
#7

You mean like this?

Код:
public LoadVehicles_data(idx,name[],value[])
E: And yes I did close the file. I have a lot more things then owner. This is the only one that requires using letters though.
Reply
#8

does it save the other things besides owner ?
Reply
#9

Yes, it's only this one due to it being the first time I'm using INI_Strings and all.
Reply
#10

I forgot to mention the error is on this line;
Код:
INI_WriteString(File,"Owner", VehicleInfo[vehID][vOwner] = name);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)