PDA

View Full Version : Noobish Gambas Question!



Gnobody
May 8th, 2005, 06:50 AM
http://img235.echo.cx/img235/4048/screenshot2ky.th.jpg (http://img235.echo.cx/my.php?image=screenshot2ky.jpg)

I am using my knowledge of VB5 to help me with Gambas, I am trying to create a simple program to test for a triangle. But I get syntax error on line 14. What am I doing wrong? :-?

JonahRowley
May 8th, 2005, 09:25 AM
It would be better to post the actual code, and not a screenshot.. I can't read that at all.

Edit: oops, it was scaled down, I can read it now, but still, code > screenshot.

I don't know VB-style basic, so I can't be sure, but that looks OK. I'd like to see what's above it. Or even the whole program, it doesn't look long.

Kimm
May 8th, 2005, 11:18 AM
If you change this line:



Dim A As Integer, B As Integer, C As Integer


To:



Dim A As Integer
Dim B As Integer
Dim C As Integer


That should work.

Gnobody
May 8th, 2005, 09:10 PM
OK, thank that works now but it won't let me take the val of a textbox?

Kimm
May 9th, 2005, 07:00 PM
I'm not very used to Gambas, I've only realy used VB6
I doubt that Gambas is exactly like VB, but perhaps you can be mroe exact to what your problem is? i.e. lets see the code that does not work

Gnobody
May 11th, 2005, 01:21 AM
I get "Type mismatch: Wanted string; Got textbox instead" whenever I try to convert a string entered in a textbox.

Ex: weight = Val(txtweight)