Author Topic: I gots a query...  (Read 6118 times)

Zorb Burger

  • Guest
I gots a query...
« on: 2006-03-09, 09:45:20 AM »
i rember seein' somfin calld 'notepad+' on dis place...  i cant fin it.  I was wonering if yall can help me find it.  i am trin teh scritp!  tanks fer ya help.

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #1 on: 2006-03-09, 10:44:16 AM »
NM yall i found it... but i be havin trouble wit getin ma code teh work!  i sav ma file as vbs, then i tri runin it and i gots dis error mess. sayin line:1, char: 17.  wat dat suppose teh mean!?  i need a rela programmer teh help me out!!

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: I gots a query...
« Reply #2 on: 2006-03-09, 03:35:57 PM »
It means that there is an error in your code on the first line, the 17th character in from the left.
Edward Dassmesser

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #3 on: 2006-03-09, 03:58:02 PM »
ever thin abou teh code is right!!  here is teh code.  it be small, but im jus startin out...

Code: [Select]
Dim strFirstName As String
Dim strLastName As String

  strFirstName  = "Zorb"
  strLastName = "Burger"
  MsgBox strLastName & ", " & strFirstName

wat am i doin rong!  i folloewd teh directions an everythin.  it like notepad++ anit readin it or somethin...

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: I gots a query...
« Reply #4 on: 2006-03-09, 04:04:43 PM »
VBScript as a language doesn't have datatypes.  Everything is a variant.  This mean that you don't use "As String" to define what type of variables you're using.

Code: [Select]
Dim strFirstName
Dim strLastName

  strFirstName  = "Zorb"
  strLastName = "Burger"
  MsgBox strLastName & ", " & strFirstName
Edward Dassmesser

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #5 on: 2006-03-09, 04:05:48 PM »
i be tryin dat, tanks fer teh help!

EDIT:  DAYUUMM!!!  U duh man Durnurd!!  it be workin!!!

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #6 on: 2006-03-09, 04:57:09 PM »
Alrigh yall, nother porb...  i am trin to get it wer ya type somfin into a input box den it display yer thing.  like ya input time an it show up the time o day.
Her be the code.:

Code: [Select]
Dim strRad
Dim strPrompt
 
 strPrompt = "Enter Time or Date: "
 strRad = InputBox(strPrompt)
 if strRad = Time, MsgBox "The time is: " & Time
  end
 if strRad = Date, MsgBox "The Date is: " & Date
  end

not sur wat i be doin rong... ???

cbass

  • Expert
  • Regular
  • *****
  • Posts: 97
  • script this
    • View Profile
    • Squest RPG
Re: I gots a query...
« Reply #7 on: 2006-03-09, 06:39:56 PM »
I don't think SGDK allows you to use an input box.  To allow input is kind of complicated to script, Bluemonk has an example in the NET demo:

https://sourceforge.net/project/showfiles.php?group_id=70424&package_id=113801

hebedaymun

  • Guest
Re: I gots a query...
« Reply #8 on: 2006-03-09, 06:41:46 PM »
maybe he's talking about general VBScript coding?  Like something not related to SGDK?  I don't know... his first question really didn't fit into the 'SGDK' scripting environment... I could be wrong though.

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #9 on: 2006-03-09, 06:54:11 PM »
tanks fer teh repli!  but dis anit fer SGDK... i am jus practicing ma skills until i be ready to tackle SGDK...

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: I gots a query...
« Reply #10 on: 2006-03-09, 07:36:27 PM »
What tutorials are you using?  The code syntax is just all wrong with that last piece of code, so you must be using some other kind of Basic.

Here's the correct VBScript code:

Code: [Select]
Dim strRad
Dim strPrompt
 
 strPrompt = "Enter Time or Date: "
 strRad = InputBox(strPrompt)
 if strRad = "Time" then MsgBox "The time is: " & Time
 if strRad = "Date" then MsgBox "The Date is: " & Date
Edward Dassmesser

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #11 on: 2006-03-09, 07:55:44 PM »
durn it  Durnurd, you be a codin power house!!! :D :D  tanks fer teh hlp!!

the tutorial is somfin calld "L-basic".  I only got teh trial version dough...  cna't afford to get som real codin tutorials... 

Zorb Burger

  • Guest
Re: I gots a query...
« Reply #12 on: 2006-03-09, 09:07:57 PM »
alrigh... i am makin somefin dat solves simple math stuff, lik addin, subtract, etc., but i cant get these darn radicals teh work.  durnurd, or any guy else, think ya can help me again? :)  hers' teh cod, and i tink it be ma finest yet ;D

Code: [Select]
Dim intResult

  intResult = (2 + 2)         'addition
  MsgBox "2 + 2 = " & intResult
  intResult = (3 * 4)         'multiplication
  MsgBox "3 * 4 = " & intResult
  intResult = (4 - 2)         'subtraction
  MsgBox "4 - 2 = " & intResult
  intResult = (6 / 3)         'division
  MsgBox "6 / 3 = " & intResult
  intResult = (2 ^ 3)         'exponents
  MsgBox "2 ^ 3 = " & intResult
  intResult = (Log(4)) 'logarithms
  MsgBox "log(4) = " & intResult
  intResult = ((1/3)-(1/4))/((1/8)+(1/2)) 'complex fraction
  MsgBox "((1/3)-(1/4))/((1/8)+(1/2)) = " & intResult
  intResult = (root(36)) 'SquareRoot
  MsgBox " Radical 36 = " & intResult

hepl be greatly appreciated!! :)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: I gots a query...
« Reply #13 on: 2006-03-09, 10:25:37 PM »
The square root function in VBScript (and VB) is called SQR rather than ROOT.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: I gots a query...
« Reply #14 on: 2006-03-09, 10:38:14 PM »