[Help] Dini Get - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Dini Get (
/showthread.php?tid=79607)
[Help] Dini Get -
borisblat - 29.05.2009
Код:
if (strcmp("/CallCar", cmdtext, true, 8) == 0)
{
if(dini_Exists( dinipath ))
{
if(dini_Isset(dinipath, "car"))
{
new number = dini_Get(dinipath, "car");
new Float:X, Float:Y, Float:Z;
SetVehiclePos(vehicle[number], X+10.0, Y, Z);
}
else return SendClientMessage(playerid,0xFF0000AA,".айп мк шлб");
}
else
{
SendClientMessage(playerid,0xFF0000AA,".айп мк шлб");
}
return 1;
}
wtf what is wrong with that?....
error 033: array must be indexed (variable "-unknown-") the error is on the line new number = dini_Get(dinipath, "car");
Re: [Help] Dini Get -
borisblat - 29.05.2009
it's important please help
Re: [Help] Dini Get -
DracoBlue - 29.05.2009
It's a number:
new number = dini_Int(dinipath, "car");
Re: [Help] Dini Get -
borisblat - 29.05.2009
but i have to know the number...
that's why i did Get
Re: [Help] Dini Get -
yom - 29.05.2009
Get is for getting string values, you don't want this.
Re: [Help] Dini Get -
borisblat - 29.05.2009
well so this is how i want it to be
in the name.txt
there is a line called "car"..
under the car key there is the ID of the vehicle in my server..
so how can i do it with dini_int ? isn't this to put something in the "car" key?
Re: [Help] Dini Get -
member - 29.05.2009
removed. responded to an earlier post which has already been answered.
Re: [Help] Dini Get -
member - 29.05.2009
Quote:
Originally Posted by borisblat
well so this is how i want it to be
in the name.txt
there is a line called "car"..
under the car key there is the ID of the vehicle in my server..
so how can i do it with dini_int ? isn't this to put something in the "car" key?
|
no Dini_IntSet is used to assign a value to a key. You need Dini_Int to get a vlue from a key.
So it would be like this:
pawn Код:
new carid = 0;
carid = dini_Int(filepath, "car");
EDit: f*** i double posted.