Reecey12345 Posted March 16, 2014 Posted March 16, 2014 Could someone explain to me what i need to do to make the crystals, money and stats cap higher than 2.1Bil? Quote
gamble Posted March 17, 2014 Posted March 17, 2014 Would bigint work over int? Exactly! Good job researching keep it up! Quote
Reecey12345 Posted March 17, 2014 Author Posted March 17, 2014 (edited) So i edit all the pages that are part of Money, Crystals etc and make it bigint instead of int? Or is there also an SQL? - Nevermind its an SQL:P Edited March 17, 2014 by Reecey12345 Quote
Reecey12345 Posted March 17, 2014 Author Posted March 17, 2014 `level` bigint(11) NOT NULL default '0', `exp` decimal(11,4) NOT NULL default '0.0000', `money` bigint(11) NOT NULL default '0', `crystals` bigint(11) NOT NULL default '0', What about the (11) does this need a change? Quote
gamble Posted March 17, 2014 Posted March 17, 2014 Maybe, 11 means that: 99,999,999,999 is the cap. set it to what you feel would be a good number. Keep in mine the (#) is how many characters are allowed Key: 4 = thousands 7 = millions 10 = billions 13 = trillions 16 = quadrillions 19= quintillions Quote
Barrikor Posted March 17, 2014 Posted March 17, 2014 Gamble - That might be the logical way for it to work... that's how it works with strings. I myself would root for it being powers of 2. Actually what the (11) does is: absolutely nothing at all! Quote
lucky3809 Posted March 17, 2014 Posted March 17, 2014 If you have mysql questions their website is quite helpful. https://dev.mysql.com/doc/refman/5.1/en/integer-types.html Quote
Dave Posted March 17, 2014 Posted March 17, 2014 Could someone explain to me what i need to do to make the crystals, money and stats cap higher than 2.1Bil? There are also numerous places in the code where variables are hard set to (int). You'll need to update this to your new data type. Quote
Reecey12345 Posted March 17, 2014 Author Posted March 17, 2014 (edited) CREATE TABLE `users` ( `userid` int(11) NOT NULL auto_increment, `username` varchar(255) NOT NULL default '', `userpass` varchar(255) NOT NULL default '', `level` bigint(16) NOT NULL default '0', `exp` decimal(11,4) NOT NULL default '0.0000', `money` bigint(16) NOT NULL default '0', `crystals` bigint(16) NOT NULL default '0', `laston` int(11) NOT NULL default '0', `lastip` varchar(255) NOT NULL default '', `job` int(11) NOT NULL default '0', `energy` int(11) NOT NULL default '0', `will` int(11) NOT NULL default '0', `maxwill` int(11) NOT NULL default '0', `brave` int(11) NOT NULL default '0', `maxbrave` int(11) NOT NULL default '0', `maxenergy` int(11) NOT NULL default '0', `hp` int(11) NOT NULL default '0', `maxhp` bigint(16) NOT NULL default '0', `lastrest_life` int(11) NOT NULL default '0', `lastrest_other` int(11) NOT NULL default '0', `location` int(11) NOT NULL default '0', `hospital` int(11) NOT NULL default '0', `jail` int(11) NOT NULL default '0', `jail_reason` varchar(255) NOT NULL default '', `fedjail` int(11) NOT NULL default '0', `user_level` int(11) NOT NULL default '1', `gender` enum('Male','Female') NOT NULL default 'Male', `daysold` int(11) NOT NULL default '0', `signedup` int(11) NOT NULL default '0', `gang` int(11) NOT NULL default '0', `daysingang` int(11) NOT NULL default '0', `course` int(11) NOT NULL default '0', `cdays` int(11) NOT NULL default '0', `jobrank` int(11) NOT NULL default '0', `donatordays` int(11) NOT NULL default '0', `email` varchar(255) NOT NULL default '', `login_name` varchar(255) NOT NULL default '', `display_pic` text NOT NULL, `duties` varchar(255) NOT NULL default 'N/A', `bankmoney` bigint(16) NOT NULL default '0', `cybermoney` bigint(16) NOT NULL default '-1', `staffnotes` longtext NOT NULL, `mailban` int(11) NOT NULL default '0', `mb_reason` varchar(255) NOT NULL default '', `hospreason` varchar(255) NOT NULL default '', `lastip_login` varchar(255) NOT NULL default '127.0.0.1', `lastip_signup` varchar(255) NOT NULL default '127.0.0.1', `last_login` int(11) NOT NULL default '0', `voted` text NOT NULL, `crimexp` int(11) NOT NULL default '0', `attacking` int(11) NOT NULL default '0', `verified` int(11) NOT NULL default '0', `forumban` int(11) NOT NULL default '0', `fb_reason` varchar(255) NOT NULL default '', `posts` int(11) NOT NULL default '0', `forums_avatar` varchar(255) NOT NULL default '', `forums_signature` text NOT NULL, `new_events` int(11) NOT NULL default '0', `new_mail` int(11) NOT NULL default '0', `friend_count` int(11) NOT NULL default '0', `enemy_count` int(11) NOT NULL default '0', `new_announcements` int(11) NOT NULL default '0', `boxes_opened` int(11) NOT NULL default '0', `user_notepad` text NOT NULL, `equip_primary` bigint(16) NOT NULL default '0', `equip_secondary` bigint(16) NOT NULL default '0', `equip_armor` bigint(16) NOT NULL default '0', `force_logout` tinyint(4) NOT NULL default '0', PRIMARY KEY (`userid`) ) ENGINE=MyISAM ; Can someone edit this SQL please, so it can be Altered into the SQL? I tried changing 'CREATE' to 'ALTER' but that didnt work :P Edited March 17, 2014 by Reecey12345 Quote
sniko Posted March 17, 2014 Posted March 17, 2014 (edited) Can someone edit this SQL please, so it can be Altered into the SQL? I tried changing 'CREATE' to 'ALTER' but that didnt work :P Wow. > Change 1 word, didn't work, must ask for help Research a little more before considering this is a valid reason to ask for help By "little", I mean extensively - I just didn't want you to read that big word and get upset that you'd have to do some work on your end. Yes I'm annoyed Edited March 17, 2014 by sniko Quote
Reecey12345 Posted March 17, 2014 Author Posted March 17, 2014 (edited) Wow. > Change 1 word, didn't work, must ask for help Research a little more before considering this is a valid reason to ask for help By "little", I mean extensively - I just didn't want you to read that big word and get upset that you'd have to do some work on your end. Yes I'm annoyed Think this forum is made for discussion, helping others and releasing things and what not else. I asked for some help like a lot of people do, i know absolutely nothing about SQL's. Anyway I looked into the Modify column stuff, nor did that help me. Edited March 17, 2014 by Reecey12345 Quote
sniko Posted March 17, 2014 Posted March 17, 2014 Think this forum is made for discussion, helping others and releasing things and what not else. I asked for some help like a lot of people do, i know absolutely nothing about SQL's. Anyway I looked into the Modify column stuff, nor did that help me. Sure. Discussion, helping others, releasing things, I agree. Giving someone the fish, and not the abilities to fish? No. Anyway I looked into the Modify column stuff, nor did that help me. Then post your new query. & If you did look into it, it did help you, just not directly with this problem. Quote
Dave Posted March 17, 2014 Posted March 17, 2014 CREATE TABLE `users` ( `userid` int(11) NOT NULL auto_increment, `username` varchar(255) NOT NULL default '', `userpass` varchar(255) NOT NULL default '', `level` bigint(16) NOT NULL default '0', `exp` decimal(11,4) NOT NULL default '0.0000', `money` bigint(16) NOT NULL default '0', `crystals` bigint(16) NOT NULL default '0', `laston` int(11) NOT NULL default '0', `lastip` varchar(255) NOT NULL default '', `job` int(11) NOT NULL default '0', `energy` int(11) NOT NULL default '0', `will` int(11) NOT NULL default '0', `maxwill` int(11) NOT NULL default '0', `brave` int(11) NOT NULL default '0', `maxbrave` int(11) NOT NULL default '0', `maxenergy` int(11) NOT NULL default '0', `hp` int(11) NOT NULL default '0', `maxhp` bigint(16) NOT NULL default '0', `lastrest_life` int(11) NOT NULL default '0', `lastrest_other` int(11) NOT NULL default '0', `location` int(11) NOT NULL default '0', `hospital` int(11) NOT NULL default '0', `jail` int(11) NOT NULL default '0', `jail_reason` varchar(255) NOT NULL default '', `fedjail` int(11) NOT NULL default '0', `user_level` int(11) NOT NULL default '1', `gender` enum('Male','Female') NOT NULL default 'Male', `daysold` int(11) NOT NULL default '0', `signedup` int(11) NOT NULL default '0', `gang` int(11) NOT NULL default '0', `daysingang` int(11) NOT NULL default '0', `course` int(11) NOT NULL default '0', `cdays` int(11) NOT NULL default '0', `jobrank` int(11) NOT NULL default '0', `donatordays` int(11) NOT NULL default '0', `email` varchar(255) NOT NULL default '', `login_name` varchar(255) NOT NULL default '', `display_pic` text NOT NULL, `duties` varchar(255) NOT NULL default 'N/A', `bankmoney` bigint(16) NOT NULL default '0', `cybermoney` bigint(16) NOT NULL default '-1', `staffnotes` longtext NOT NULL, `mailban` int(11) NOT NULL default '0', `mb_reason` varchar(255) NOT NULL default '', `hospreason` varchar(255) NOT NULL default '', `lastip_login` varchar(255) NOT NULL default '127.0.0.1', `lastip_signup` varchar(255) NOT NULL default '127.0.0.1', `last_login` int(11) NOT NULL default '0', `voted` text NOT NULL, `crimexp` int(11) NOT NULL default '0', `attacking` int(11) NOT NULL default '0', `verified` int(11) NOT NULL default '0', `forumban` int(11) NOT NULL default '0', `fb_reason` varchar(255) NOT NULL default '', `posts` int(11) NOT NULL default '0', `forums_avatar` varchar(255) NOT NULL default '', `forums_signature` text NOT NULL, `new_events` int(11) NOT NULL default '0', `new_mail` int(11) NOT NULL default '0', `friend_count` int(11) NOT NULL default '0', `enemy_count` int(11) NOT NULL default '0', `new_announcements` int(11) NOT NULL default '0', `boxes_opened` int(11) NOT NULL default '0', `user_notepad` text NOT NULL, `equip_primary` bigint(16) NOT NULL default '0', `equip_secondary` bigint(16) NOT NULL default '0', `equip_armor` bigint(16) NOT NULL default '0', `force_logout` tinyint(4) NOT NULL default '0', PRIMARY KEY (`userid`) ) ENGINE=MyISAM ; Can someone edit this SQL please, so it can be Altered into the SQL? I tried changing 'CREATE' to 'ALTER' but that didnt work :P As Sniko has said you should do some more research first! ALTER TABLE tablename MODIFY columnname INTEGER; Source: http://stackoverflow.com/questions/1356866/how-do-i-change-the-data-type-for-a-column-in-mysql As you can see, the syntax is different from the CREATE syntax. So say we wanted to change money to a bigint ALTER TABLE users MODIFY money BIGINT; I'd suggest reading up on the syntax in some detail on the MySQL site http://dev.mysql.com/doc/refman/5.1/en/alter-table.html Quote
Reecey12345 Posted March 17, 2014 Author Posted March 17, 2014 As Sniko has said you should do some more research first! Source: http://stackoverflow.com/questions/1356866/how-do-i-change-the-data-type-for-a-column-in-mysql As you can see, the syntax is different from the CREATE syntax. So say we wanted to change money to a bigint I'd suggest reading up on the syntax in some detail on the MySQL site http://dev.mysql.com/doc/refman/5.1/en/alter-table.html Thanks for that Dave, you explained it a little better than how i looked at it on the website and ive done it all now. One more thing for you Dave, i bought your Ajax Chat & Ajax Cart mods, the Ajax cart works perfectly, but the Chat when i make a new chat and try to add the requirements of the 3 usernames i want to have access to it, it doesnt save the requirements at all. Quote
Dave Posted March 17, 2014 Posted March 17, 2014 Thanks for that Dave, you explained it a little better than how i looked at it on the website and ive done it all now. One more thing for you Dave, i bought your Ajax Chat & Ajax Cart mods, the Ajax cart works perfectly, but the Chat when i make a new chat and try to add the requirements of the 3 usernames i want to have access to it, it doesnt save the requirements at all. Good stuff! Glad I could help. Hmm weird. I'll send you a PM! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.