The Armor Games website will be down for maintenance on Monday 10/7/2024
starting at 10:00 AM Pacific time. We apologize for the inconvenience.

ForumsProgramming ForumWhat do I do?

23 9647
Runescape124
offline
Runescape124
3,028 posts
Nomad

I want to make a game based off the one I made a while back, before I joined AG (the PC I made it with is in some PC grave yard, lol). Do I get Visual Basic and type out every little word and symbol, buy the highly expensive Flash Builder 4 from Adobe, or get a free, low-tech flash builder from some random website?

  • 23 Replies
PixelSmash
offline
PixelSmash
566 posts
Nomad

That's quite an attitude for someone who - in his own words - is a beginner. We can't help you if you don't explain what you want, and if you can't explain properly don't put the blame on us. We know next to zero about what you're planning to do, what you're using, and how you want to build the game. Garbage in = garbage out.

erricki
offline
erricki
15 posts
Nomad

Sorry , buddy , my mistake :P. Now i really need your help ... i am doing a puzzle game in Visual Basic 6 and i have got an error : Sub or Function not defined. This is the code :
Option Explicit
Dim puzzle0 As Integer
Dim puzzle1 As Integer
Dim puzzle2 As Integer
Dim puzzle3 As Integer
Dim puzzle4 As Integer
Dim puzzle5 As Integer
Dim puzzle6 As Integer
Dim puzzle7 As Integer
Dim puzzle8 As Integer
Dim puzzle9 As Integer
Dim puzzle10 As Integer
Dim puzzle11 As Integer
Dim puzzle12 As Integer
Dim puzzle13 As Integer
Dim puzzle14 As Integer
Dim puzzle15 As Integer
Dim puzzle16 As Integer
Dim puzzle17 As Integer
Dim puzzle18 As Integer
Dim puzzle19 As Integer
Dim puzzle20 As Integer
Dim puzzle21 As Integer
Dim puzzle22 As Integer
Dim puzzle23 As Integer
Dim puzzle24 As Integer
Dim puzzle25 As Integer
Dim puzzle26 As Integer
Dim puzzle27 As Integer
Dim puzzle28 As Integer
Dim puzzle29 As Integer
Dim puzzle30 As Integer
Dim puzzle31 As Integer


Private Sub cmdexit_Click()
End
End Sub

Private Sub cmdsolve_Click()
Solve
End Sub

Private Sub cmdstart_Click()
cmdstart.Enabled = False
cmdsolve.Enabled = True
Initialize_Puzzle
End Sub

Private Sub Form_Load()
cmdsolve.Enabled = False
Randomize
Solve
End Sub
Public Sub Initialize_Puzzle()
Dim X As Integer
Dim innerLoop As Integer
Dim liRandomIndex As Integer
Dim lbUsed As Boolean
Dim lbFoundDup As Boolean
For X = 0 To 31
puzzle(X) = 99
Next X
For X = 0 To 31
Picture1(X).Enabled = True
Next X
For X = 0 To 31
Picture1(X).BackColor = vbBlue
Next X
For X = 0 To 31
Picture2(X).Enabled = True
Next X
For X = 0 To 31
Set Picture2(X).Picture = LoadPicture
Next X
For X = 0 To 31
Picture2(X).BackColor = vbWhite
Next X
For X = 0 To 31
lbUsed = True
Do Until lbUsed = False
liRandomIndex = Int(32 * Rnd)
lbFoundDup = False
For innerLoop = 0 To 31
If puzzle(innerLoop) = liRandomIndex Then
lbFoundDup = True
End If
Next innerLoop
If lbFoundDup = False Then
Picture1(X).Picture = PictureClip1.GraphicCell(liRandomIndex)
puzzle(X) = liRandomIndex
lbUsed = False
Exit Do
End If
Loop
Next X
End Sub
Private Sub Picture1_DragOver(Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
Source.MousePointer = 12
End Sub

Private Sub Picture2_DragDrop(Index As Integer, Source As Control, X As Single, Y As Single)
If Source.BackColor = vbBlack Or Source.BackColor = vbBlue Then
If Picture2(Index).BackColor = vbBlack Then
Exit Sub
ElseIf Picture2(Index).BackColor = vbWhite Then
Picture2(Index).Picture = Source.Picture
Picture2(Index).BackColor = vbBlack
Set Source.Picture = LoadPicture
Source.BackColor = vbWhite
Exit Sub
End If
End If
If TypeOf Source Is PictureBox And Source.BackColor = vbBlue Then
Picture2(Index).Picture = Source.Picture
Set Source.Picture = LoadPicture
Picture2(Index).BackColor = vbBlack
End If
End Sub

Private Sub Picture2_DragOver(Index As Integer, Source As Control, X As Single, Y As Single, State As Integer)
Source.MousePointer = 0
End Sub
Public Sub Solve()
Dim X As Integer
cmdsolve.Enabled = False
For X = 0 To 31
Picture1(X).Picture = PictureClip1.GraphicCell(X)
Next X
For X = 0 To 31
Picture1(X).Enabled = False
Next X
For X = 0 To 31
Picture2(X).Enabled = False
Next X
cmdstart.Enabled = True
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
cmdexit_Click
End Sub

erricki
offline
erricki
15 posts
Nomad

i am getting the error at the line :
Public Sub Initialize_Puzzle()
this line is highlighted in yellow, and the line :
puzzle(X) = 99
in grey . So what can i do to debug it ?
thanks .

PixelSmash
offline
PixelSmash
566 posts
Nomad

Well the language isn't familiar to me, but I'd guess it's something along the lines of 'uzzle(X)' is undefined. The compiler thinks you're trying to access the function or sub 'uzzle' with 'X' as argument. Since I don't see a function / sub called like that, I'm guessing that's not what you had in mind?

The yellow probably is the function / sub where the error occurs, and the grey the specific line

Good luck!

Darkroot
offline
Darkroot
2,763 posts
Peasant

fine, don't help .


Nice attitude and patience, makes everyone more receptive to your needs no?


buddy , i just need to know how to put all the codes together , imagine that you have a few pieces and you need to put them together . the thing is that I have all the codes i need , but they came in sections, right now, if there is someone who know little bit of VISUAL BASIC and can help me ... thanks for your reply


Buddy no one is going to help you script a game. This is the programming thread not copy and paste thread.

Nice so you posted a wall of code and you expect us to go through all of it and find what is wrong? I highly doubt your wrote any of that and it's waaay to complicated for a beginner. I will say what ever other programming forum on the internet would say is that we don't program for you we only help you. Either find and post what exactly (not a wall of code) is what you're having problems with or find something easier to start out with.
erricki
offline
erricki
15 posts
Nomad

Sorry :P, really sorry ... Thanks for explaining me , and sorry for my attitude , buddy .. I changed my project to the easiest one, and I am able to do it right now , I've learned to code in VB also , the basics. The code i posted above is from a book , but don't think that there they gave the complete code, so that i could Copy - Paste it ... anyway , sorry again for my stupid attitude. I actually found the problem in my code, it's that i should have Dim-ed puzzle as puzzle(31) and that i should have introduced once more a PictureClip in my form , that's all . Thanks, guys.

Darkroot
offline
Darkroot
2,763 posts
Peasant

No problem programming is really just a puzzle and if you work on it long and hard on it your guaranteed to succeed. That success will lead to more knowledge and experience and soon you will be pretty good at programming. It's ok to ask questions if you're stuck and don't want to waste forever with some small thing but you're programming the game not us. Good luck.

erricki
offline
erricki
15 posts
Nomad

Thanks .

Showing 16-23 of 23