Scrolling Game Development Kit Forum
SGDK Version 1 => Script => Topic started by: Zorb Burger 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.
-
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!!
-
It means that there is an error in your code on the first line, the 17th character in from the left.
-
ever thin abou teh code is right!! here is teh code. it be small, but im jus startin out...
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...
-
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.
Dim strFirstName
Dim strLastName
strFirstName = "Zorb"
strLastName = "Burger"
MsgBox strLastName & ", " & strFirstName
-
i be tryin dat, tanks fer teh help!
EDIT: DAYUUMM!!! U duh man Durnurd!! it be workin!!!
-
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.:
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... ???
-
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
-
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.
-
tanks fer teh repli! but dis anit fer SGDK... i am jus practicing ma skills until i be ready to tackle SGDK...
-
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:
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
-
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...
-
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
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!! :)
-
The square root function in VBScript (and VB) is called SQR rather than ROOT.
-
BTW, have you tried looking at Microsoft's VBScript reference?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/cfd87c86-9217-4783-9eba-4fee0261ca06.asp (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/cfd87c86-9217-4783-9eba-4fee0261ca06.asp)
-
DAYUUMM!! U an ur bro a couple o' coding gods! wer yall get all teh info on codin!! yall prolly went teh college... ;D
tank fer teh help, and teh reference!!
-
okay... i am wonderin if yall can mak lik a sample script of lik som e graphx mad wit VBS... i wanted to lern ow teh doo dat stuff wit an explam. i be noin dat bulemonk and DUh-Duh-durnurd!! can do it, but if some one else can doo i t i be greatly happy!! ;D
-
I don't think it's possible to to graphics in pure VBScript. You'd need to use a component that does graphics in combination with VBScript. Of course GameDev is such a component, but maybe that's more complex than you want. But if your goal is to learn VBScript so that you can use it with GameDev, then maybe it's time to start some simple scripting in GameDev?
-
dat sounds lik a good durn idear!! if ya could, can ya help me wit a simple script teh learn from? or sould i be downloadin som gams wit scripts teh get an idea? ???
not ser, how bout you bluemonk?
-
My first suggestion would be to look at the top post in this scripting forum where it has information about debugging script. See if you can figure out (with the help of that post) how to make a script that shows some debug messages on the screen while you're playing the game.
-
ok man! i be chekin dat out now!! tanks fer teh suggesten :)