|
| 24 Nov 2013 12:22 PM |
Hey guys, just finished the great wall challenge from Google Codejam. (code DOT google DOT com SLASH codejam SLASH contest SLASH 2434486 SLASH dashboard#s=p1)
Here's my code:
pastebin/KfWeBzJf
I was wondering if anyone could make a more efficient script - because I know mine is really slow. |
|
|
| Report Abuse |
|
|
MettaurSp
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 3179 |
|
|
| 24 Nov 2013 12:23 PM |
| Private paste, can't view it o3o |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:24 PM |
| Thanks for giving us a private paste. We really appreciate being able to view your code. |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:24 PM |
| Sorry, changing to unlisted. q.q |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:25 PM |
Should work now. In case you don't want to scroll up the page because you're lazy. (You know who you are)
pastebin/KfWeBzJf |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:29 PM |
| No one will accept my challenge? q.q |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Nov 2013 12:31 PM |
Erm, did you put the ride google code up
That one is diamonds, yours is tribes |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:34 PM |
Wow, wrong links today.
q.q
code DOT google DOT com SLASH codejam SLASH contest SLASH 2437488 SLASH dashboard#s=p2 |
|
|
| Report Abuse |
|
|
MettaurSp
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 3179 |
|
|
| 24 Nov 2013 12:35 PM |
| Sorry, my brain is constantly going blank right now. My brother is playing obnoxiously distracting and entertaining episodes of American Dad while I can't seem to solve a very simple error .-. |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:36 PM |
| What error did you run into? |
|
|
| Report Abuse |
|
|
MettaurSp
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 3179 |
|
|
| 24 Nov 2013 12:41 PM |
383|function GetHum(par) 384| if not par then 385| return 386| end 387| for i,v in pairs(par:children()) do 388| if v:IsA("Humanoid") and v.Health>0 then 389| return v 390| end 391| end 392|end 393|function CharAdded() 394| print("Added") 395| coroutine.wrap(ChangeArea)("Grassland") 396| while not player.Character and not GetHum(player.Character) do 397| wait(0.1) 398| end 399| print("Changed Music") 400| local ch = player.Character 401| print(ch,ch:FindFirstChild("Humanoid"),GetHum(ch)) 402| energy = maxenergy 403| lvlval = Instance.new("IntValue",ch.Humanoid)
Output: 10:42:18.709 - Humanoid is not a valid member of Model 10:42:18.731 - Script 'Players.Player9.PlayerGui.Duck', Line 403 10:42:18.732 - stack end 10:42:18.733 - Disconnected event because of exception 10:42:18.789 - attempt to call a nil value
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Nov 2013 12:42 PM |
| ^ What does that have anything to do with this O_o |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:42 PM |
I was wondering the same thing...
:/ |
|
|
| Report Abuse |
|
|
MettaurSp
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 3179 |
|
|
| 24 Nov 2013 12:43 PM |
| I didn't state I was specifically working on thedestroyer's script. I am just annoyed by some error that shouldn't be happening at all in a game I am working on. |
|
|
| Report Abuse |
|
|
blocco
|
  |
| Joined: 14 Aug 2008 |
| Total Posts: 29474 |
|
|
| 24 Nov 2013 12:56 PM |
| google code jam problems tend to be more cognition than coding |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 12:58 PM |
@blocco I agree with that. These kinds problems actually make your brain 'hurt.' :P |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Nov 2013 12:59 PM |
I wish I understood what they are asking me to do... After reading 5 sentences I forget everything they asked me to do -.- Is this what I get for not reading or just bad memory, oh well |
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 01:01 PM |
Reread the input section and below ten times.
Especially the part where it explains what is meant to happen from the input someone give.
|
|
|
| Report Abuse |
|
|
|
| 24 Nov 2013 01:01 PM |
Reread the input section and below ten times.
Especially the part where it explains what is meant to happen from the input example provided.* |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|