[Help] Dini Get
#1

Код:
  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");
Reply
#2

it's important please help
Reply
#3

It's a number:

new number = dini_Int(dinipath, "car");
Reply
#4

but i have to know the number...

that's why i did Get
Reply
#5

Get is for getting string values, you don't want this.
Reply
#6

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?
Reply
#7

removed. responded to an earlier post which has already been answered.

Reply
#8

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


Forum Jump:


Users browsing this thread: 3 Guest(s)