ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
What's wrong with my bot's initialization code? (sorry for being a newb, lol) (Sdk)
What's wrong with my bot's initialization code? (sorry for being a newb, lol) // Sdk.duo.Aug 16, 2003, 6:17pm
sdk.QuickStartGlobal = True
sdk.aw_init AW_BUILD Dim rc As Long rc = sdk.QuickStart(342836, "PASSWORD REMOVED (-:", "Duobot", "Duobot", "jediwrld", 0, 0, 0, 0, 0) If rc Then MsgBox rc peoplepos = 0 help, lol BTW, thanks for sdkocx6 richard strike rapierAug 16, 2003, 6:28pm
Feck knows.... (Btw, dont use SdkOcx6!!!)...
dim rc as long rc = sdk.aw_init(AW_BUILD) if (rc) then MsgBox "Error Code on Init: " & rc end if [View Quote] .duo.Aug 16, 2003, 6:29pm
strike rapierAug 16, 2003, 7:13pm
AwSdkDll2 - www.grimmsoft.com
Then use the RC number given to find the cause of the error on www.activeworlds.com/sdk/reason.htm - Mark [View Quote] joemanAug 16, 2003, 8:39pm
Your bot seems to be written in some lame programming language that isn't a
programming language at all. Perhaps you should, write it in a real one? -Joe [View Quote] strike rapierAug 16, 2003, 8:54pm
Yeah... that too... but you gotta start somewhere (Just not VB... I can
honestly say once you know of arrays, loops and basic handling... get the hell outta VB... don't go into API and such.. its a waste of time, C++ is 100% directly.. no screwing about. :) - Mark [View Quote] baronAug 16, 2003, 9:07pm
In article <3f3eb62a at server1.Activeworlds.com>, strike at Rapiercom.freeserve.co.uk says...
> Yeah... that too... but you gotta start somewhere (Just not VB... I can > honestly say once you know of arrays, loops and basic handling... get the > hell outta VB... don't go into API and such.. its a waste of time, C++ is > 100% directly.. no screwing about. :) > > - Mark > [View Quote] Don't blame the weapon, blame the murderer. VB is a great tool for devoloping countless solutions, not to mention that it can keep many young fellows with a null CV and zero understanding of the job market out of the unemployment line. Keep your eyes on the ball. ../B joemanAug 17, 2003, 1:21am
I don't see many openings for "Ultra-l33t VB pr0ramma for t0p seakrit
project!", the openings I see are "Talented C/C++ programmer needed for high paying position.". -Joe [View Quote] baronAug 17, 2003, 3:59am
In article <3f3ef4ce$1 at server1.Activeworlds.com>, joeman at bootdown.com says...
> I don't see many openings for "Ultra-l33t VB pr0ramma for t0p seakrit > project!", the openings I see are "Talented C/C++ programmer needed for high > paying position.". > > -Joe > Then you are probably looking in the wrong places assuming that you even bothered looking in the first place, of course the syntax is slightly different for job openings than the one you used :) My point is, learn all you can and don't underestimate corporate standards like VB out of superiority syndrome or whatever other mystical reasons. Things are hard and they are going to get harder; no one likes one trick ponies. If you know C++, learn VB and Delphi; if you know windows, learn unix. Btw from my experience, the "for high paying position" part is wishful thinking for any programmer with a null or less than two pages CV who knows only one language (even if that is assembly). ../B bowenAug 17, 2003, 4:24am
[View Quote]
Ahh, but C++ is more portable and would thus have more opportunities
than any VB programmer. PASCAL might also be considered portable (delphi wouldn't -- since it's the VB of the PASCAL language, and will only be available wherever Borland develops it.). Sure, it doesn't hurt to learn more languages. But some are better designed for tasks then others. VB should really only be used for client software. While C++ can be used for both... from a "overall" standpoint C++ is the better choice of the two if you're going to learn one or the other. Wait... here comes the VB brigade. It is present now, a disturbance I feel. -- --Bowen-- No of SETI units returned: 69 Processing time: 57 days, 10 hours. (Total hours: 1378) www.setiathome.ssl.berkeley.edu joemanAug 17, 2003, 4:38am
Ok, so... I know every windows version (save windows 1.0), unix, Linux,
Solaris, OS X.... I know VB, and C/C++, enough assembly to get me through some tight spots, PHP, XBox API... and a lot more... So, now what do I learn? It seems I've already met and exceeded your "quota" to diss on VB. Also, I've read plenty of job listings. So, I say I'm fully qualified to say that VB is a horrible programming language. Not only do you need runtime DLLs to run the most basic code, but its really not programming at all, only scripting. You can do a lot more with C, its more portable, and it also does require 9 million runtime dlls that bloat up your system. Sure, it might be *easy*, but sometimes the easy way, isn't the best way to do things. Compare a basic C application with a VB one, both do the exact same thing. You'll find that VB wastes like, 400 - 900KB on god knows what. I will admit, I've used VB for a few simple programs when I don't want to mess with Winsock and windows in C, but all of those programs sucked. All I can say is: been there, done that, hated it. Seriously... learn C for Christ's sake. -Joe [View Quote] baronAug 17, 2003, 5:48am
In article <3f3f22de$1 at server1.Activeworlds.com>, joeman at bootdown.com says...
> Ok, so... I know every windows version (save windows 1.0), unix, Linux, > Solaris, OS X.... I know VB, and C/C++, enough assembly to get me through > some tight spots, PHP, XBox API... and a lot more... So, now what do I > learn? It seems I've already met and exceeded your "quota" to diss on VB. > Also, I've read plenty of job listings. > > So, I say I'm fully qualified to say that VB is a horrible programming > language. Not only do you need runtime DLLs to run the most basic code, but > its really not programming at all, only scripting. You can do a lot more > with C, its more portable, and it also does require 9 million runtime dlls > that bloat up your system. > > Sure, it might be *easy*, but sometimes the easy way, isn't the best way to > do things. Compare a basic C application with a VB one, both do the exact > same thing. You'll find that VB wastes like, 400 - 900KB on god knows what. > I will admit, I've used VB for a few simple programs when I don't want to > mess with Winsock and windows in C, but all of those programs sucked. All I > can say is: been there, done that, hated it. > > Seriously... learn C for Christ's sake. > > -Joe > To me, no one is qualified to say any language is a "horrible programming language", especially when we are talking about the most used problem solving language in corporate environments used by millions of programmers but this is the internet, anyone says whatever they want :) Nobody cares in the real world (!=bots) for the "400 - 900KB" wasted (which is a false assertion) or the "9 million runtime dlls that bloat up your system" (ditto). They want the job done, as fast as possible and have a solution that can be easily supported and developed; not have 3,000 lines of code just for sending an app to the systray (or your winsock example) just because it *might* execute 100ms faster. I have seen a lot of bad C code as well as a lot of bad VB code and a lot of bad Java code and a lot of bad ------ (insert lang name here) code; all languages are great just as all OS are great, it's how you use them that makes the difference. If you have the knowledge you mentioned, that's good for you; you are not a one trick pony which was the point in my original post. Anyway this has gone enough off topic so I rest my case here; not sure why you assume I don't know C though :) ../B strike rapierAug 17, 2003, 8:00am
Well,
Perhaps the better descriptor would be "Horrible programming language - for me", after all each to their own tallents, abilities and what they prefer to use... Anyway, Visual Basic is good in the fact thats its a Rapid Development Platform... this is of course until you try to intergrate some API... then you end up with 30 modules / classes full of API and basic-classes code just for WritePrivateProfileString API... The way I look at it, C++ cuts down on the dependancies... but creating its dialogs can be hellish at points, even with MFC, in *most* cases the C++ code is also more portable to other systems. The other benefits I can see are things like inline asm code, dynamic memory allocation (new / delete are the most brilliant things for 3 / 6 character words!). Granted some things may generally be harder (char arrays etc) with faster-than-light speed and handling... and you have CString or you own classes if you need them, but theyre slower... but its left to the programmer to decide, and its quite viable to dump one to the other half way down a procedure just to make life easier for yourself and dump a little speed. Next, the limitations... I, personally find the syntax of the VB language hard to cope with and rediculously hard to track, as you said, C++ freaks if you miss a ; out but its nothing that can't be solved by reading though 2 or 3 lines of code. I just like the { } syntax.... I also like how you can create different levels of variables encased in { }'s in different sections of the procedures.... Course... the best bit of C++ over VB is OOP, the class based structure and derivision etc of C++ kicks the preverbial shite out of anything VB can offer like that... I remember using Brants classes for avatars... and it ended up taking like half a second to loop though the avatars and check several variables, mainly because you had to call bloody member functions to get and set variables! Now on a bot that handles typically 50 to 100 events a second this is... bad... Then, I created the whole project in C++, and whooosh, direct access to all the variables, and public, private and protected content! Not to mention no variants! (Unless you use COleVariant classes for DAO DB as Im having to...) which speeds things up a rediculous level... and the concept of overloading is absolutly brilliant... Take my Zeus bot for example... the console message to user function, its overloaded with.... ConsoleMessage(CString szMessage, int red, int green, int blue, bool bold, bool italics); ConsoleMessage(CConsoleMessage *pConsoleMsg); ConsoleMessage(CAwMessageDump *pMessageDump); Now thats infinatly better than having 3 different function names for each of them... they may need different bodies but its still a brilliant way of handling things... Admittedly... I still use VB at some points..; Even though I usually hate using it (Seem to put ; after every line....); Which gets realllly reallly reallly annoying; But, like I said.. when you basically want to take something like a text box and do some replacements at once, you can't beat VB for dev time, 10 seconds, literally... best because of its form based development... Of course once you start dumping into things like API, and copying and pasting a exoillion lines of API code into modules... (Unless you were l33t and made a VB add in *G*) it gets damned annoying! Personally I don't see why you have to have a hundred lines of const int WM_BLAH = &3B2C... A B at stard with C++ is the things like strtok that take a lot of working out, and really... its best to dump the loop to a class and read pointers to char arrays from there... VB rules on strtok vs split... Anyway, thats what I wanted to say.. I just find C++ more of an actual programming language... and less of just writing stuff out in plain english, lets face it.. natural language IS slower... GUI vs DOS... DOS wins hands down for most things (excluding graphics design etc, hehe)... - Mark [View Quote] > To me, no one is qualified to say any language is a "horrible programming language", > especially when we are talking about the most used problem solving language in corporate > environments used by millions of programmers but this is the internet, anyone says > whatever they want :) > > Nobody cares in the real world (!=bots) for the "400 - 900KB" wasted (which is a false > assertion) or the "9 million runtime dlls that bloat up your system" (ditto). They want > the job done, as fast as possible and have a solution that can be easily supported and > developed; not have 3,000 lines of code just for sending an app to the systray (or your > winsock example) just because it *might* execute 100ms faster. I have seen a lot of bad C > code as well as a lot of bad VB code and a lot of bad Java code and a lot of bad ------ > (insert lang name here) code; all languages are great just as all OS are great, it's how > you use them that makes the difference. > > If you have the knowledge you mentioned, that's good for you; you are not a one trick > pony which was the point in my original post. Anyway this has gone enough off topic so I > rest my case here; not sure why you assume I don't know C though :) > > ./B .duo.Aug 17, 2003, 10:09am
I'm terrible at making windows programs in C++ though, rofl.
[View Quote] .duo.Aug 17, 2003, 10:11am
I agree. I myself use red hat and windows, and in terms of programming I use
C++, C, Java, and VB (more if I knew more). [View Quote] .duo.Aug 17, 2003, 10:13am
I know like 2 things in C. One of them is printf, and the other is scanf
rofl. I would use C++ if I was good with the windows API in it (-:. I'm great with swing in java, too bad there isn't an sdk for that... [View Quote] .duo.Aug 17, 2003, 10:21am
"Course... the best bit of C++ over VB is OOP, the class based structure and
derivision etc of C++ kicks the preverbial shite out of anything VB can offer like that... I remember using Brants classes for avatars... and it ended up taking like half a second to loop though the avatars and check several variables, mainly because you had to call bloody member functions to get and set variables! Now on a bot that handles typically 50 to 100 events a second this is... bad... Then, I created the whole project in C++, and whooosh, direct access to all the variables, and public, private and protected content!" yeah, that's why I want to use C++. But I don't get how your supposed to use the windows API with it... and I don't really remember the windows API anyway, roflmao. "Not to mention no variants! (Unless you use COleVariant classes for DAO DB as Im having to...) which speeds things up a rediculous level... and the concept of overloading is absolutly brilliant... Take my Zeus bot for example... the console message to user function, its overloaded with.... ConsoleMessage(CString szMessage, int red, int green, int blue, bool bold, bool italics); ConsoleMessage(CConsoleMessage *pConsoleMsg); ConsoleMessage(CAwMessageDump *pMessageDump); Now thats infinatly better than having 3 different function names for each of them... they may need different bodies but its still a brilliant way of handling things..." Another reason I want to use C++... but I'm terrible at windows API, not to mention C++ in general rofl. "But, like I said.. when you basically want to take something like a text box and do some replacements at once, you can't beat VB for dev time, 10 seconds, literally... best because of its form based development... Of course once you start dumping into things like API, and copying and pasting a exoillion lines of API code into modules... (Unless you were l33t and made a VB add in *G*) it gets damned annoying! Personally I don't see why you have to have a hundred lines of const int WM_BLAH = &3B2C..." Which is why I was using VB, I want a windows GUI but I suck at windows API (and don't know how to combine it with the AW SDK anyway). "Anyway, thats what I wanted to say.. I just find C++ more of an actual programming language... and less of just writing stuff out in plain english, lets face it.. natural language IS slower... GUI vs DOS... DOS wins hands down for most things (excluding graphics design etc, hehe)..." Yup. I want my windows API though, lol. strike rapierAug 17, 2003, 10:50am
strike rapierAug 17, 2003, 12:49pm
Let me give all of the newbs to programming a piece of advice from my own
experience... Way yonder back, I wanted to be a programmer. I was shopping one day, and found a book in a bookshop called "Using Visual Basic" it was about £6.99 so I bought it... I took it home... fired up Visual Basic.. and then set to work! I wondered why most the stuff it told me to do didnt actually exist in my version of the VB IDE... and why I had to load it up though MS Word each time, It didnt say anything about that in the book... oh dear... yep you guessed it, I thought VBA was full VB... what a prat I was... Anyway, VB went out the window for a few weeks... then, a friend gave me a VB package, the one above the training edition... and I realised... wow! Timer control, this must be the real deal! Indeed it was... I managed form.print "Hello World" and was amazed with myself and went running off bragging about how good I was at VB... sad sad me... I spent about 10 hours a day coding... lol, Managed to make 3 calculators erm... all using inputboxes and just had basic stuff... litterally, utter crap... You only learn how crap you are at something when your either humble... which lets face it no new programmer is... or you have a more experienced programmer take the piss... in my case it was the latter... and Robbie (Gamer at the time) absolutly slammed me when I couldent even impliment a simple function! I copied and pasted and thought I was soooo l33t not understanding the first bloody thing about what the hell I was doing with all this code, error after error.... It was about this time Baron was close to having a mental breakdown from me telegraming him every... 30 seconds or so... (no... literally) and at this time he gave me this really brilliant idea.... why not... get a book!? The idea seemed so enlightening at the time, so I went off down to PC world and I got a book called 'Visual Basic Step By Step' from the MS press.... I spent the next 3 week or so doing NOTHING but learning things from that book, it actually explained what functions, subs etc are, what control attributes and GUIs are... I thought I was so good before but I knew NOTHING that this book was teaching me... One thing I must stress to every new programmer, programming takes utter dedication, if you can not be bothered with it, turn back now... Anyway, I kept learning and learning, bots were the key to me learning VB, I made everything with it, database bots, drawing bots, the works, being reassured by friends that I could make it and always having the fallback of chuckling at the person who taught me almost everything else I know about it (Baron) when he took out all of AWGZ with a PK bot on eject by accident... Now I know I was bad... but some people out there are worse... telegrams such as 'how do I put text in a text box'... a person can explain to you how to put text in a text box... but thats all, but if you LEARN how about control attributes and properties, you will be able to handle everything! Background colours, fonts etc... But you have to keep commiting yourself to it.. never give up and seek help from people when you need it, but don't be a idiot and try and get *all* the solutions from other people, its what I tried doing with Baron.. it dosent work... you end up getting more and more confused.... But keep at it, and remember you have to LEARN... get books, read websites... its all good... Eventually I got to the point (World Core 5) where VB could no longer handle what I needed to do with it... and that was the end of VB for me... now Ive started all over again (Although this time I promised myself I wouldent hassle anyone!)... And hey, look where its got me. Im lead programmer for an AW distributor :) - Mark bowenAug 17, 2003, 2:59pm
[View Quote]
Bad C code will not compile. There may be practices you don't agree
with that others do (like using a break to get out of a loop), but, it's not bad code. Unlike VB, you can't really make a horrible mistakes and get the same result. -- --Bowen-- No of SETI units returned: 69 Processing time: 57 days, 10 hours. (Total hours: 1378) www.setiathome.ssl.berkeley.edu bowenAug 17, 2003, 3:04pm
[View Quote]
Cstring? You mean the microsoft string handeler? There is an ANSI C++
string class you know. (#include <cstring> - or was it just <string>?) -- --Bowen-- No of SETI units returned: 69 Processing time: 57 days, 10 hours. (Total hours: 1378) www.setiathome.ssl.berkeley.edu .duo.Aug 17, 2003, 5:37pm
strike rapierAug 17, 2003, 6:24pm
|