Eruondo Posted April 19, 2009 Posted April 19, 2009 Re: Businesses Mod [Mccode V2] very very very nice mod i cant belive your giving it away for free This mod doesn't work. I have it on my game and you cant add anyone to your business. It works with me. It just needs some editing. I've sorted out all bugs except the one with the daycron. Which I still need some help with, please. :| Every time the cron is run, it takes the profits for that day, and overwrite what you have in the vault. Example: I have 500k in my vault, New day comes and I earn 2.5k that day Now I only have 2.5k in the vault. Could someone please help? I bet it's something really simple, but I've been working on this since friday. Quote
supernova800 Posted April 27, 2009 Posted April 27, 2009 Re: Businesses Mod [Mccode V2] Really nice mod!! When bankrupting the business I get this error: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in business_manage.php on line 300 You have decided to bankrupt the business, all members have been fired. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Anyone else getting this? No events are sent and the money in the vault disappears :-( I would have thought the vault money should go to the diractor? Also, each day no money is paid out to the members, i dont think their stats are upgraded either... the cron runs without any errors tho. I have loaded all the changes i think.. Any help would be appreciated Thanks again for a great mod!! Quote
Bubbl3z Posted May 10, 2009 Posted May 10, 2009 Re: Businesses Mod [Mccode V2] Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in C:\wamp\www\business_view.php on line 18 Quote
REGGIE KRAY Posted June 15, 2009 Posted June 15, 2009 Re: Businesses Mod [Mccode V2] ALSO i'm testing it. i have a car dealership and i'm the only member. i put 900,000,000 into the vualt as test money. after rollover theirs 29k left. whats up with this? i slightly edited the business_cron thing. heres what it is now. $new_profit = (($new_customers + rand(-4, 8)) * ((($bs['classCost'] / 10000) * rand(2, 4)) / 50) * ($amount + 1)); I've got the same problem. I guess it's got something to do with either the `busCash` = `busCash` + '%d' or ($new_profit - $bs['busCash']) part in the business_cron.php. Am I right? I'm looking for a fix, but I hate MySQL. Argh, how I wish I was back in the good ol' flashdays. I think this Mod is great apart from I have the same problem when the cron kicks in all the money in the vault goes and you seem to end up with a random amount. Quote
Dimension Posted June 16, 2009 Posted June 16, 2009 Re: Businesses Mod [Mccode V2] I set the standard number for all new businesses in the database to five. Not a wery elegant solution, but I'm a n00b and it get's the job done. And then I changed the code so that the price of upgrading is not dependant of the max amount of employees, but the price of the business + the price of the upgrades. yh i need a hand basicaly i cant find the right part in databse to edit which one is it and how to di edit table if ya can sum instructions will be good thanks :-o :-D :roll: :mrgreen: Quote
Sindikit Posted June 16, 2009 Posted June 16, 2009 Re: Businesses Mod [Mccode V2] For those of you having trouble with your vault money getting overwritten each day, this will fix your problem: Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Dimension Posted June 16, 2009 Posted June 16, 2009 Re: Businesses Mod [Mccode V2] I set the standard number for all new businesses in the database to five. Not a wery elegant solution, but I'm a n00b and it get's the job done. And then I changed the code so that the price of upgrading is not dependant of the max amount of employees, but the price of the business + the price of the upgrades. yh i need a hand basicaly i cant find the right part in databse to edit which one is it and how to di edit table if ya can sum instructions will be good thanks :-o :-D :roll: :mrgreen: sorry if i forgot to mention i need the instrtcions to edit tables to let my company have more members as im the only member(director) and if some one applys it says no more members can be fitted. so i need to know how to edit the database and which table to edit thanks Quote
Feky Posted June 16, 2009 Posted June 16, 2009 Re: Businesses Mod [Mccode V2] ok you can't choose the director as a member so i don't know how thier supposed to get money. also when i click bankrupt business it just returns to the business section and deosn't delete the business i got the same problem lol when i clikc bankrupt it returns me to the bussiness section function bankrupt_business() { global $ir, $inf; if(!$_GET['confirm']) { echo 'You are about to bankrupt the '.stripslashes($inf['busName']).' business. Please confirm this action. Once this has been confirmed there is no chance to go back. > Bankrupt the business'; } else { $send_event = mysql_query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId'])); while($se = mysql_fetch_assoc($send_event)) { $text = "The director has chosen to bankrupt the {$inf['busName']} business\, all members have been discharged."; insert_event($se['bmembMember'], $text); } mysql_query(sprintf("DELETE FROM `businesses_members` WHERE (`bmembBusiness` = '%u')", $inf['busId'])); mysql_query(sprintf("DELETE FROM `businesses` WHERE (`busId` = '%u')", $inf['busId'])); echo 'You have decided to bankrupt the business, all members have been fired.'; } } this is the bankrupt function Quote
Sindikit Posted June 16, 2009 Posted June 16, 2009 Re: Businesses Mod [Mccode V2] For the bankruptcy to work, in business_manage.php: Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Sindikit Posted June 16, 2009 Posted June 16, 2009 Re: Businesses Mod [Mccode V2] Really nice mod!! When bankrupting the business I get this error: Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in business_manage.php on line 300 You have decided to bankrupt the business, all members have been fired. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Anyone else getting this? No events are sent and the money in the vault disappears :-( I would have thought the vault money should go to the diractor? Also, each day no money is paid out to the members, i dont think their stats are upgraded either... the cron runs without any errors tho. I have loaded all the changes i think.. Any help would be appreciated Thanks again for a great mod!! Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Feky Posted June 17, 2009 Posted June 17, 2009 Re: Businesses Mod [Mccode V2] Manage business Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/feky/public_html/business_manage.php on line 297 You have decided to bankrupt the business, all members have been fired. > Home this is the bug i get and +2 for sindikit Quote
Sindikit Posted June 17, 2009 Posted June 17, 2009 Re: Businesses Mod [Mccode V2] Thanks :) Feky, that is happening because the sql query has a syntax error. Do the following below..you can see in the sql statement that it says "FROM WHERE" blah blah. Well you need to specify where you are getting the information from within the SQL, so you need to say "FROM businesses_members WHERE" blah and you won't get the error anymore. Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Feky Posted June 17, 2009 Posted June 17, 2009 Re: Businesses Mod [Mccode V2] Thanks sindikit worked like a charm +1 but one peoblem is that player can have a job and work in a bussiness how do i make it so they only can be in one job Quote
thedestroyer Posted July 10, 2009 Posted July 10, 2009 Re: Businesses Mod [Mccode V2] can anyone post a code with some job specials please :-D Quote
Strats Posted July 10, 2009 Posted July 10, 2009 Re: Businesses Mod [Mccode V2] Shush. What does this mod actually do? Quote
Eruondo Posted July 10, 2009 Posted July 10, 2009 Re: Businesses Mod [Mccode V2] can anyone post a code with some job specials please :-D There is a job specials in here somewhere. Just take that and modify it to fit your needs. I can do it for you when I get home, but that's not until 1 1/2 weeks. Quote
thedestroyer Posted July 10, 2009 Posted July 10, 2009 Re: Businesses Mod [Mccode V2] Kix thanks for the update but it doesnt work. When i use your cron companies dont make any money daily and if i do Richards cron you make way too much and you dont even need an workers to make loads of money. Quote
benlakaz Posted July 25, 2009 Posted July 25, 2009 Re: Businesses Mod [Mccode V2] Hello guys, Whats the problem with this cron I copied in the 1st page of this topic.. Business Vault is always equal to business latest profit.. Business latest profit does not add to business vault.. its always equal.. for example.. your vault yesterday is $1,400.. then today the latest business proft is $800.. so your vault should be $2200.. but its not.. its equal to $800.. Thanks in advance.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
radio_active Posted July 26, 2009 Posted July 26, 2009 Re: Businesses Mod [Mccode V2] Hello guys, Whats the problem with this cron I copied in the 1st page of this topic.. Business Vault is always equal to business latest profit.. Business latest profit does not add to business vault.. its always equal.. for example.. your vault yesterday is $1,400.. then today the latest business proft is $800.. so your vault should be $2200.. but its not.. its equal to $800.. Thanks in advance.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. If you browse each page of the thread (which i recommend), you will undoubtedly come across several fixes and upgrades for this particular script. But seen as someone else always provides the answer on this forum, i believe the below post is the answer to your question. For those of you having trouble with your vault money getting overwritten each day, this will fix your problem: Find: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Replace with: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
benlakaz Posted July 26, 2009 Posted July 26, 2009 Re: Businesses Mod [Mccode V2] thanks radio.. but i cant see any difference with that code.. can u tell me whats the difference.. thank you Quote
benlakaz Posted July 26, 2009 Posted July 26, 2009 Re: Businesses Mod [Mccode V2] sorry for my last post.. i saw the difference now.. thanks again Quote
benlakaz Posted July 28, 2009 Posted July 28, 2009 Re: Businesses Mod [Mccode V2] hello, I just want to ask what part of this code should I change to decrease the daily income of each company?? because it makes a lot of profit everyday.. Thanks in advance.. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Eruondo Posted August 1, 2009 Posted August 1, 2009 Re: Businesses Mod [Mccode V2] This part. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
endo Posted August 1, 2009 Posted August 1, 2009 Re: Businesses Mod [Mccode V2] hmm all of this should be put together as one :| i may do it when i get half a chance Quote
weewooz Posted August 5, 2009 Posted August 5, 2009 Re: Businesses Mod [Mccode V2] as anyone got all this info off all 10 pages lol and put it together and got it to work yet :) 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.