Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Game: Fix da codez

Author
Message
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 24th Aug 2004 06:34
In this game, the point is to fix codes.
The codes must be complete and when fixed, work in DBP.
You must know the solution to your code before you post it.
Also you must explain briefly what your code is ment to do.
When you reply, you must post either "I give up." or the solution to the person who posted before you's code, then your code.
After you post, the person above you must post the solution for thier code.

I'll start:

Ment to print random numbers but won't compile.


OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 24th Aug 2004 06:39
I do think we have enough 'games' going around, so I dont think we need any more.

Anyway, the code should be :




Come to the UK Convention on the 23rd & 24th of October
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 24th Aug 2004 06:47 Edited at: 24th Aug 2004 06:47


should make 10 boxes, compiles, but crashes with an error.

zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 24th Aug 2004 07:23 Edited at: 24th Aug 2004 07:25


As games go, it is possible for some folks to learn something as they go along. So, it has more merit than some of the others. One idea might be to snag problems from the DBP or new comers list. Thus, they get a solution as you show off your code skills.
--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
bitJericho
21
Years of Service
User Offline
Joined: 9th Oct 2002
Location: United States
Posted: 24th Aug 2004 07:24
i think the point was to create another buggy piece of code

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 24th Aug 2004 07:41 Edited at: 24th Aug 2004 07:42
Code doesnt work:

Should make l33t MMORPG, but it simply doesnt reckognise the command

eat much pie
20
Years of Service
User Offline
Joined: 9th Apr 2004
Location: Within the mind of a lowly mortal...
Posted: 24th Aug 2004 07:45
This should work




[href]Checkpoint Router[/href]: My AI Routing Program
Sam Wright
Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 24th Aug 2004 07:54
lol someone should make this into a propper puzzle game exe, it'd help noob how to learn the software that made it.

although, im startin to think this thread was made as a new way of getting ppl to fix his code for him, but new that if he didnt add the game aspect, no one would have bothered as much. etc.

Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 24th Aug 2004 08:30
No I just created it out of bordem.
And I made that code up(and I ment for it to have 2 errors).

Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 24th Aug 2004 09:06 Edited at: 24th Aug 2004 09:06
just joshin dude.

btw i dont c difference btween u code and te corrected code

Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 24th Aug 2004 09:08
misspellings in randomize and str$.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Aug 2004 09:31


code wont compile


I used to have to hand write pascal code for tests. No compiler to check for erros, so this is a piece of cake.

"eureka" - Archimedes
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 24th Aug 2004 09:53


GothOtaku
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location: Amherst, MA, USA
Posted: 25th Aug 2004 03:47
Here's a harder one. There's 10 errors. Some are logic errors but are easy enough to pick out.

teh game wiz
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: EWS
Posted: 25th Aug 2004 03:57


i think thats what it was ment to do.

GothOtaku
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location: Amherst, MA, USA
Posted: 25th Aug 2004 04:01
Yep, pretty that's pretty much what it is.
Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 25th Aug 2004 04:04
Quote: "goto end"

Quote: "end:"

replace end with "final" or "finish" or something

Quote: "do:x=15"

should be:
Quote: "x=15:do"


Quote: "print "X ="+str$(x)"

instead of:
Quote: "print X ="+str$(x)"


Quote: "if x=5 then"

"then" shouldn't be there.

Quote: "exit function"

that command doesn't even exist

actually, that functions pretty confusing as what u want it to do.

Quote: "print s"


should be a string, not integer, so S should be S$

Quote: "s$=last()"

shouldnt there be SOMETHING in the brackets. not sure what tho.

Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 25th Aug 2004 04:06 Edited at: 25th Aug 2004 04:30


this would b more efficient:



i give up on the rest



it SHOULD pick a random window that is closed, open it for 3 secs, then close it, and then wait another sec before another window opens in its place.

it SHOULDNT have the window open twice or more on the same occassion (u'll see what i mean when it compiles and runs) and the higher difficulty u use, the more you notice it.

GothOtaku
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location: Amherst, MA, USA
Posted: 25th Aug 2004 04:09
Quote: "Quote: "exit function"
that command doesn't even exist
"

"exitfunction" does though...

As for the x in the function declaration that's a typo because it's not used in the function or alternately the line should be "s$=last(x)".
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 25th Aug 2004 08:52
Amazing the way people try to attract attention to their coding problems.

There's a forum for this!

And we don't need anymore games!!!




Get 15 new commands, all the date / time commands left out of DBPro for free!
DOWNLOAD PLUGINS HERE: http://www.davidtattersall.me.uk/ and select "DarkBasic"
Teh Go0rfmeister
21
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 25th Aug 2004 20:06
*guilty as charged*

Killswitch
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: School damnit!! Let me go!! PLEASE!!!
Posted: 27th Aug 2004 00:31
Maybe there could be a game forum?

~It's a common mistake to make, the rules of the English langauge do not apply to insanity~
Damokles
21
Years of Service
User Offline
Joined: 28th May 2003
Location: Belgium
Posted: 27th Aug 2004 00:46
Then we could make this kind of game :

Quote: "
General Talk / Game: Gimme da codez
"


Quote: "
The game goes like this :
I ask the next poster to code something and he can ask the following poster to code something.

Example :
I ask :
"How can I make a cube ?"
Answer from the next poster :
"Make object cube 1,1
How can I make a cone"



Now I start :
How can I send a message from one computer to the other, in a way that the reciever can read it ?
"


That would be amazing.

- Mind the gap -
Trowbee
21
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 27th Aug 2004 04:00
Going back to what Jerico2day typed:


If you look closely, you can see how it won't work.

The first loop of myObj (when its 1) will work, because you:
- Make object #1
- Make object #2 (1+1)

Then, myObj is incremented to 2, so DBPro then see's:
- Make object #2
- Make object #3

Now, object #2 already exists, as you made it the pass before, so it exits.

If you use the following code, it will work.
FOR myObj = 1 TO 5
MAKE OBJECT CUBE myObj, 5
MAKE OBJECT CUBE myObj+5, 5
NEXT myObj

Hell Dragonz43
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: at home or at work
Posted: 27th Aug 2004 04:05
Okok... We have to make this orginized. Someone answers then someone posts another one. What i mean is its sorta gettting confusing : /


www.freewebs.com/mycomputergames
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 27th Aug 2004 06:04
It was ment that you post the answer to the above post and a code you want the answer to in the same post.

Hell Dragonz43
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: at home or at work
Posted: 27th Aug 2004 06:58 Edited at: 27th Aug 2004 07:00
Yes, exacly.

WOA, my mouse just moved by its self... Um, that BETTER have been a computer glitch... Uh oh.

Heres one:
What is wrong with this?

Print "Welcome! Press any key to start!"
Wait For Key
Wait 1000
Print "Loading..."
Text "Ok, you started."
Do
Loop


www.freewebs.com/mycomputergames
Trowbee
21
Years of Service
User Offline
Joined: 12th Apr 2003
Location: United Kingdom
Posted: 27th Aug 2004 07:18
Which wrong bit do you mean?

Wait For Key is Wait Key
[b]Text "Ok, you started."[b] is [b]Text 0,20,"Ok, you started."[b]
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 27th Aug 2004 08:00
And put loading before wait 1000 and add some cls.

Here's one

Won't compile.

RougeCat
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Xdrome
Posted: 27th Aug 2004 16:04
Must be



Guess this must do it.
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 28th Aug 2004 05:38
Ok but


RougeCat
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Xdrome
Posted: 28th Aug 2004 14:59
Oh ok! I missed that statement out. Rightoo! Fix this!




This code just wont compile.
Ilya
21
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 29th Aug 2004 02:17


Get errors(ment to move the camera around and print collision if it collides with the box)


RougeCat
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Xdrome
Posted: 30th Aug 2004 14:43
First heres the correction for the code i posted.



N heres the solution to ur code

Login to post a reply

Server time is: 2024-09-22 12:21:53
Your offset time is: 2024-09-22 12:21:53