[HELP] Pickups.
#1

Hello. So, I started again my project about Dynamic Pickups.
But, the problem it's, I wanted to save all pickups like:

pawn Код:
0.ini
1.ini
2.ini
etc.ini
But, all pickups are saved in a single file..
All pickups are saved in this file. P.S: I don't know how the hell appeared here and why.



I wanted to save them like:



Anyway, I hope you understanded my issue.

Code: www.pastebin.com
Reply
#2

Shouldn't this be like this?
pawn Код:
stock PickPath(pickid)
{
        new string[4];
        format(string, sizeof(string), "/Pickups/%d.ini", pickid);
        return string;
}
So each time you are saving, pickup's path will be different from other pickups.
EDIT: That string's size won't be enough to store the path so you should set it larger.
Reply
#3

Thanks @dominik.

I have tried your variante, but gives me error.
I have a global variable for pickid, I can't define it as a global variable and use it in a stock.
It gives error.

Thanks anyway.
Anybody else?
Reply
#4

You didn't use anywhere pickid except in declaring it and in format.
What about this?
pawn Код:
if(sscanf(params, "ii", pickid , Tip))
new INI:File = INI_Open(PickPath(pickid ));
...
////////////////////////
stock PickPath(pickupid)
{
        new string[4];
        format(string, sizeof(string), "/Pickups/%d.ini", pickupid);
        return string;
}
Reply
#5

Anyway, tried your code. Doesn't work.
I made this very much times... but now, I don't know why doesn't work.
Can be because Y_ini it's outdated? I don't know.

Anybody else..?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)