A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 20 Aug 2011 01:58 PM |
ok, so i was making a killstreak gui where when a person reaches a certain killstreak, they can click the open button and the killstreak frame opens, but my concern is that when i click a killstreak, i do not receive the killstreak. i get this output:
Sat Aug 20 14:50:26 2011 - Running Script "Players.Player.PlayerGui.Killstreak.Main.RCXD.Script" Sat Aug 20 14:50:26 2011 - Players.Player.PlayerGui.Killstreak.Main.RCXD.Script:22: '< eof >' expected near 'end'
and
Sat Aug 20 14:50:26 2011 - Running Script "Players.Player.PlayerGui.Killstreak.Main.GrimReaper.Main" Sat Aug 20 14:50:26 2011 - leaderstats is not a valid member of Player Sat Aug 20 14:50:26 2011 - Script "Players.Player.PlayerGui.Killstreak.Main.GrimReaper.Main", Line 2 Sat Aug 20 14:50:26 2011 - stack end
ok, and heres my RCXD script:
player = script.Parent.Parent.Parent.Parent.Parent gold = player.leaderstats.Killstreak item = game.Lighting.RCXD price = 3
function buy () if gold.Value >= price then script.Parent.Parent.Parent.Disable = true script.Parent.Parent.Parent.TextTransparency = 0.5 local b52 = game:GetService("InsertService"):LoadAsset(50808700) b52.Parent = vPlayer.Backpack local m = vPlayer.Backpack.Model local va = m:findFirstChild("B-52") if (va==nil) then return end va.Parent = m.Parent m:remove() script.Parent:remove() end end end script.Parent.MouseButton1Down:connect(buy)
----------------------------------------------------------------------------------- and heres my grim reaper script:
player = script.Parent.Parent.Parent.Parent.Parent gold = player.leaderstats.Killstreak item = game.Lighting.GrimReaper price = 7
function buy() if gold.Value >= price then script.Parent.Parent.Parent.Disable = true script.Parent.Parent.Parent.TextTransparency = 0.5 local a = item:clone() a.Parent = player.Backpack end end script.Parent.MouseButton1Down:connect(buy) |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 20 Aug 2011 02:01 PM |
| srry my RCXD is supposed to be for my b52, i forgot to rename the button. lol, HELP!!!!!!!!!!!!!!!!!! |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2011 02:02 PM |
| You have to many ends according to the output... |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 20 Aug 2011 02:10 PM |
| ya, but i went throught the script like 10 times, and all my ends r needed, cuz i have like 2 ifs and a function. |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
| |
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 20 Aug 2011 03:00 PM |
It's true. Too many ends.
Some of your if lines have ends on the same line. Do not add it, again. |
|
|
| Report Abuse |
|
|
grimm343
|
  |
| Joined: 18 Sep 2008 |
| Total Posts: 2796 |
|
|
| 20 Aug 2011 03:03 PM |
"leaderstats is not a valid member of Player"
That's your other script. I think that tells you exactly what is the matter. |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 20 Aug 2011 03:09 PM |
leaderstats is not a valid mem, does that mean that it cannot find my leaderboard?
|
|
|
| Report Abuse |
|
|
|
| 20 Aug 2011 03:10 PM |
| Sometimes the one script runs before another. It's nothing to worry about, it'll work in online mode. |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 20 Aug 2011 03:13 PM |
| ok, but i still cannot figure out the b52 script, im stumped! lmao, can someone help me find the extra end? |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2011 03:32 PM |
player = script.Parent.Parent.Parent.Parent.Parent gold = player.leaderstats.Killstreak item = game.Lighting.RCXD price = 3
function buy () if gold.Value >= price then script.Parent.Parent.Parent.Disable = true script.Parent.Parent.Parent.TextTransparency = 0.5 local b52 = game:GetService("InsertService"):LoadAsset(50808700) b52.Parent = vPlayer.Backpack local m = vPlayer.Backpack.Model local va = m:findFirstChild("B-52") if (va==nil) then return end va.Parent = m.Parent m:remove() script.Parent:remove() end end script.Parent.MouseButton1Down:connect(buy)
That should work. |
|
|
| Report Abuse |
|
|
A22asin
|
  |
| Joined: 04 Jul 2011 |
| Total Posts: 313 |
|
|
| 20 Aug 2011 04:05 PM |
| OK, BUT NOW, I DONT GET THE KILLSTREAK REWARD FOR EITHER. PLZ HELP! |
|
|
| Report Abuse |
|
|
|
| 20 Aug 2011 04:22 PM |
| Make sure all the variables are defined properly. |
|
|
| Report Abuse |
|
|