Need Help Here - 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: Need Help Here (
/showthread.php?tid=664832)
Need Help Here -
PoniStar - 12.03.2019
hi , how can i check that a line is exist in some .ini file ? i want to put this on house loader , if a line wast exist , first write that line and then load them :
if --> WeaponHolder1 --> was not in house file --> write WeaponHolder1 --> and set WeaponHolder 1 to 0 (WeaponHolder1=0)
Re: Need Help Here -
ApolloScripter - 12.03.2019
I deduce that you are already using some
.INI reader, just use it and read the documentation of it, there should contain the functions responsible for getting and setting a value, as the example in
DOF2 (DOF2_SetInt) or
(DOF2_GetInt).
So you can simply use a simple conditional if it is an integer or boolean value to compare, otherwise you can use
strcmp, and check if it is different from null.