SA-MP Forums Archive
[Help] few question... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] few question... (/showthread.php?tid=143028)



[Help] few question... - DarrenReeder - 20.04.2010

(1) On my script i have used a mysql plugin. When i restart the GM with 'gmx' then i try to log in. It crashes the server without ANY warnign at all.. it just shuts down. I thought maybe its because the server hasnt connected to the database yet (although i thought it does before it goes online?) and i try to call info from the database (although it already does that wen checking to see if account exist so weather to do /register or /login dialog box.. hmmm) well, if anyone know why this occurs, please help

(2) I am trying to do a ratio for my kills and death however i have done Kills / deaths (divided) although it just comes out as like, '12393453' just a load of numbers, Anyone know how i can make it come out normally as like '#.#' ?

thats all for now, thanks!


Re: [Help] few question... - Backwardsman97 - 20.04.2010

On question number 2, are you saying that it comes out to a huge number or a big decimal? As for question number 1, I don't have any knowlege of mysql.


Re: [Help] few question... - DarrenReeder - 20.04.2010

Quote:
Originally Posted by Backwardsman97
On question number 2, are you saying that it comes out to a huge number or a big decimal? As for question number 1, I don't have any knowlege of mysql.
massive number

*Edit, it is a Float:


Re: [Help] few question... - Backwardsman97 - 20.04.2010

Well I would try to print the variables storing kills and deaths to make sure they are correct. https://sampwiki.blast.hk/wiki/File_Functions If you scroll to the bottom of that page, there is an example of how to do kill / death ratios if that helps.