SA-MP Forums Archive
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)
+--- Thread: dini_get (/showthread.php?tid=526962)



dini_get - SnG.Scot_MisCuDI - 20.07.2014

How can i get the interior ID from the saved file and check to see if it equals X

pawn Код:
(205) : error 033: array must be indexed (variable "-unknown-")
(206) : warning 211: possibly unintended assignment
(206) : error 036: empty statement
pawn Код:
205: new Interiorid = dini_Get(HouseFile, "InteriorID");
206:            if( Interiorid = 5);
pawn Код:
new Interiorid = dini_Get(HouseFile, "InteriorID");
            if( Interiorid = 5);
            {
                SetPlayerPos(playerid, 318.7627,1117.2900,1083.8828);
                SetPlayerInterior(playerid, 5);
                SetPlayerVirtualWorld(playerid, i);
                SetPlayerFacingAngle(playerid, 0);
                SetCameraBehindPlayer(playerid);
            }
            if( Interiorid = 3);
            {
                SetPlayerPos(playerid, 235.1389,1189.2161,1080.2578);
                SetPlayerInterior(playerid, 3);
                SetPlayerVirtualWorld(playerid, i);
                SetPlayerFacingAngle(playerid, 0);
                SetCameraBehindPlayer(playerid);
            }
            if( Interiorid = 7);
            {
                SetPlayerPos(playerid, 225.4881,1024.5122,1084.0078);
                SetPlayerInterior(playerid, 7);
                SetPlayerVirtualWorld(playerid, i);
                SetPlayerFacingAngle(playerid, 0);
                SetCameraBehindPlayer(playerid);
            }



Re: dini_get - nmader - 20.07.2014

Try using dini_Int.
Also as for your warnings use == if your checking a variables value in an if statement.


Re: dini_get - SnG.Scot_MisCuDI - 20.07.2014

Quote:
Originally Posted by nmader
Посмотреть сообщение
Try using dini_Int.
Also as for your warnings use == if your checking a variables value in an if statement.
Ty, and i was adding ; at the end of the statement which was wrong also


Re: dini_get - nmader - 20.07.2014

Quote:
Originally Posted by SnG.Scot_MisCuDI
Посмотреть сообщение
Ty, and i was adding ; at the end of the statement which was wrong also
That'd do it haha.