generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Broken Tycoon income script

Previous Thread :: Next Thread 
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 07:35 PM
Well, I'm currently making my own tycoon. Doing well, but having trouble with this script.
Due to the output, it should be malfunctioning on the "ic = script.Parent.Income" part. See, the thing is, Is that It doesn't make much sense. I'm trying to set a variable, but its acting as if line 3 is an if statement.

ch = script.Parent.Owner.Value
ls = game.Players[ch]leaderstats
ic = script.Parent.Income

while true do
ls.Materials.Value = ls.Materials.Value + ic.Value
wait(60)
end



The output says
"Workspace.Tycoon.IncomeGiver:3: '=' expected near 'ic'"


Thanks alot
-Chief
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
11 Oct 2011 07:37 PM
Owner is a string value right?

-I love music. I play guitar.
-I enjoy foruming.
-I know multiple programming languages, along with mark-up languages.
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 07:38 PM
Yes, but the output doesn't say thats the problem? The problem should be at line 3.
Report Abuse
darkkiller5555 is not online. darkkiller5555
Joined: 22 Nov 2009
Total Posts: 6359
11 Oct 2011 07:42 PM
The output is vague, 1/2 the time it gives you the line it's near.

I see no error in the coding. :L

-I love music. I play guitar.
-I enjoy foruming.
-I know multiple programming languages, along with mark-up languages.
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 07:43 PM
Eh. I'm going to try to do double equals then see what the output says.
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 07:44 PM
...

It still gives the same output.
Report Abuse
Peyotr is not online. Peyotr
Joined: 26 Sep 2011
Total Posts: 207
11 Oct 2011 07:44 PM
double equals means "Is Equal too," you will get an error out of it.
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 07:45 PM
Yeah, I know.
Thats why the output made no sense.
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 07:55 PM
Bump.

On an offtopic note, shame that basically all the tycoons in the first 1-10 pages are free models.
Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 08:31 PM
Bump AGAIN.. Help appreciated.
Report Abuse
pwnedu46 is not online. pwnedu46
Joined: 23 May 2009
Total Posts: 7534
11 Oct 2011 08:58 PM
"ls = game.Players[ch]leaderstats"

replace that with

ls = game.Players[ch].leaderstats

You forgot a dot between Players[ch] and leaderstats


~ I'm a unicorn ~
Report Abuse
BlackKnightXxAlt is not online. BlackKnightXxAlt
Joined: 24 Jan 2011
Total Posts: 16
11 Oct 2011 08:58 PM
ch = script.Parent.Owner.Value
ls = game.Players[ch]leaderstats
ic = script.Parent.Income

while true do
ls.Materials.Value = ls.Materials.Value + ic.Value
wait(60)

IncomeValue.(whatever income) = (how many seconds)
Income.Workspace

GetChild.Parent = ("2254.4234245")

end
end
end



Report Abuse
Chiefwaffles is not online. Chiefwaffles
Joined: 02 Nov 2009
Total Posts: 1138
11 Oct 2011 11:20 PM
@Pwn

Thanks alot, It's working now.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image