SA-MP Forums Archive
Looping - 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: Looping (/showthread.php?tid=386112)



Looping - Glint - 19.10.2012

Hello guys fast question

I want to loop through a certain .ini file i am using y_ini and find a specific number that i specify.

Any ideas.

I already sent a PM to Y_Less but he didn't answer i guess he is busy because he always answers me however.

Thanks in advance guys, if you help me :P


Re: Looping - HuSs3n - 19.10.2012

there in no function in y_ini that allows you to search into a file for a specific number (afaik)


Re: Looping - Glint - 19.10.2012

Any other ways ?


Re: Looping - mamorunl - 19.10.2012

I guess you can loop through every file and check if the value or key (don't know what your 'number' is) matches your given number.


Re: Looping - Kwarde - 19.10.2012

But if you found the number, what do you wanna do? Do you wanna return TRUE/FALSE or something? (Eg. just a check to see wether it exists or not), or do you wanna output it, or output a string or something that is related to that number?
Because if you want to return TRUE or FALSE, I guess you could loop the file character-by-character and check if it's that number or not.


Re: Looping - Glint - 19.10.2012

I want to check if it exists or not if it does i am going to return error if it doesn't i am going to complete the proccess.


Re: Looping - Kwarde - 19.10.2012

And what about the variation of these numbers? Is it from 0 to and with 9, or higher then 9? Because if it's 9 or lower, I may know how to figure this out. If it's above, I may figure it out too. But to do this, I'm gonna need the content of the file you want to check the content from, so I can create it and test it


Re: Looping - Glint - 19.10.2012

Quote:
Originally Posted by Kwarde
View Post
And what about the variation of these numbers? Is it from 0 to and with 9, or higher then 9? Because if it's 9 or lower, I may know how to figure this out. If it's above, I may figure it out too. But to do this, I'm gonna need the content of the file you want to check the content from, so I can create it and test it
Do you have Skype ?


Re: Looping - Kwarde - 19.10.2012

Yes, but I don't give it away to anyone but reallife friends . You could try on MSN.
However, I'll have to go in a very short while again (going to systema [=sport/russian martial art]), which will take about 3 hours. Then I can go home again, going to a party. Upcoming weekend I'll be working (we're gonna repaint the stairs), and next week we're on holiday (without internet), so I may not be able to help you more for a while.

Kind regards,
Kwarde


Re: Looping - Glint - 19.10.2012

I fixed it guys thanks everyone +rep to everyone