|
| 14 Sep 2011 07:04 PM |
This is the main script i have all the values handles but.. it only checks multiplcation ex: i sellect addition (AboolValue) and i set main number (1337) and secondary number (145) it should print (Or create a message i cant decide) you check what you want multiplcation, division, additon, subtraction so when it checks it says + (Because im adding) in the StringValue, but it only works if you check multiplcation
what im sating is that it only checks one then ends or whatever if is spelled something wrokg, deal with it
mn = script.Parent.MainNumber.Value sn = script.Parent.SecondaryNumber.Value mul = script.Parent.Multiplcation.Value div = script.Parent.Division.Value add = script.Parent.Addition sub = script.Parent.Subtraction sp = script.Parent sym = script.Parent.Symbol
if mul == true then sym.Value = "*" print 'Multiply' else if div == true then sym.Value = "/" print 'Division' else if add == true then sym.Value = "+" print 'Addition' else if sub.Value == true then sym.Value = "-" print 'Subtraction'
end end end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Sep 2011 07:25 PM |
| Bumb i know there is someone out there to help |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 07:34 PM |
still dosent work but i think this is better
mn = script.Parent.MainNumber sn = script.Parent.SecondaryNumber mul = script.Parent.Multiplcation div = script.Parent.Division add = script.Parent.Addition sub = script.Parent.Subtraction sp = script.Parent sym = script.Parent.Symbol
if mul == true then sym.Value = "*" print 'Multiply' end if div == true then sym.Value = "/" print 'Division' end if add == true then sym.Value = "+" print 'Addition' end if sub.Value == true then sym.Value = "-" print 'Subtraction' end |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 07:55 PM |
Ok im the only one postin asdgfasfv5343572349upguhdsaf-4u5h3245624368y23-95hn23perasdnfka[se]r345u2=-369u2346j2430-e8riewqjfdsa |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 14 Sep 2011 07:56 PM |
You said if mul == true then I'm assuming mul is a boolvalue, and you must say mul.Value == true in that case. |
|
|
| Report Abuse |
|
|
Rukiryo
|
  |
| Joined: 04 Sep 2009 |
| Total Posts: 1490 |
|
|
| 14 Sep 2011 07:57 PM |
In fact, you have multiple ones where you said if mul == true, or div == true. Check that. It must be a value. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 14 Sep 2011 08:06 PM |
mn = script.Parent.MainNumber.Value sn = script.Parent.SecondaryNumber.Value mul = script.Parent.Multiplcation div = script.Parent.Division add = script.Parent.Addition sub = script.Parent.Subtraction sp = script.Parent sym = script.Parent.Symbol
if mul.Value == true then sym.Value = "*" print 'Multiply' else if div.Value == true then sym.Value = "/" print 'Division' else if add.Value == true then sym.Value = "+" print 'Addition' else if sub.Value == true then sym.Value = "-" print 'Subtraction'
end end end end
-Like an __AWESOME__ boss |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 08:09 PM |
Workspace.Calculator.Calculator:30: NO!
mn = script.Parent.MainNumber.Value sn = script.Parent.SecondaryNumber.Value mul = script.Parent.Multiplcation div = script.Parent.Division add = script.Parent.Addition sub = script.Parent.Subtraction sp = script.Parent sym = script.Parent.Symbol
if mul.Value == true then sym.Value = "*" print 'Multiply' else if div.Value == true then sym.Value = "/" print 'Division' else if add.Value == true then sym.Value = "+" print 'Addition' else if sub.Value == true then sym.Value = "-" print 'Subtraction'
end end end end
if sym.Value == "" then error'NO!' end |
|
|
| Report Abuse |
|
|
|
| 14 Sep 2011 08:09 PM |
Workspace.Calculator.Calculator:30: NO!
mn = script.Parent.MainNumber.Value sn = script.Parent.SecondaryNumber.Value mul = script.Parent.Multiplcation div = script.Parent.Division add = script.Parent.Addition sub = script.Parent.Subtraction sp = script.Parent sym = script.Parent.Symbol
if mul.Value == true then sym.Value = "*" print 'Multiply' else if div.Value == true then sym.Value = "/" print 'Division' else if add.Value == true then sym.Value = "+" print 'Addition' else if sub.Value == true then sym.Value = "-" print 'Subtraction'
end end end end
if sym.Value == "" then error'NO!' end |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Sep 2011 08:10 PM |
Obviously, none of the values are true.
-Like an __AWESOME__ boss |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Sep 2011 08:13 PM |
| Sorry just really want this script |
|
|
| Report Abuse |
|
|
GoldenUrg
|
  |
| Joined: 23 Aug 2009 |
| Total Posts: 6428 |
|
|
| 14 Sep 2011 09:21 PM |
If you use "elseif" instead of "else if" then you don't need an extra end.
Why don't you also print each object's value to make sure they are what you expect?
|
|
|
| Report Abuse |
|
|
| |
|