SA-MP Forums Archive
Convert MYSQL to Y_INI? - 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: Convert MYSQL to Y_INI? (/showthread.php?tid=597399)



Convert MYSQL to Y_INI? - Flybyu - 30.12.2015

Hello! Can someone tell me how to convert this from MYSQL to Y_INI or do it for me?
http://pastebin.com/HzgGuhkN
http://pastebin.com/B7Z8aVR9


Re: Convert MYSQL to Y_INI? - Vince - 30.12.2015

Nearly impossible (I won't say totally impossible) due to the way it works. Converting to SQLite might be an option, but ini files are definitely out of the question. I suppose it could be replicated somewhat using flat files, but you would need a large tree structure with a directory for each separate house. Each directory then has multiple files in it that store the coordinates of furniture and whatnot. Theoretically this would allow for infinite houses with infinite furniture, but it would be completely ineffecient, not to mention very disk intensive and therefore slow.

tl;dr: counter productive.


Re: Convert MYSQL to Y_INI? - Stones - 31.12.2015

You'd spend more time converting it then actually doing you're script.


Re: Convert MYSQL to Y_INI? - XStreeter - 31.12.2015

Mysql is better than INI so i will say never change your script to ini
You can use some better good functions that never can be use with ini
MySql its perfecet


Re: Convert MYSQL to Y_INI? - Elegy - 31.12.2015

Yes,mysql is perfect,but how about someone noob who dont know how to use mysql like me?
Idk how to setup mysql


Re: Convert MYSQL to Y_INI? - Flybyu - 31.12.2015

I have done the rest of my server project with Y_INI, so i tought it would easier to convert those to Y_INI


Re: Convert MYSQL to Y_INI? - PrO.GameR - 31.12.2015

Quote:
Originally Posted by Elegy
View Post
Yes,mysql is perfect,but how about someone noob who dont know how to use mysql like me?
Idk how to setup mysql
Well, some people (Which are really rare in sa-mp forums apparently) would go and learn mysql instead of telling everyone that they don't know how to use it, but well .. I guess you are not one of them, so nope, it's not that easy to re-create mysql with ini

Seriously people, if you are incapable of learning then coding is not for you, if you are capable.. TRY AND LEARN

You wanna know how many times I've re-written my whole gamemode (mostly working on it as a hobby, but still counts)? Getting close to 2 digits, currently overhauling it to a modular script.


Re: Convert MYSQL to Y_INI? - TakeiT - 31.12.2015

If you really want to use INI, you can load everything into the server using mysql, then create a new save function to save it to ini. Once you've re-written everything, replace your loading function with a new ini one. However, MySql is more flexible in what you can do with it