Board ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
ananas // User Search
ananas // User SearchVB INI Functions "Compile Error: Type Mismatch"Dec 29, 2001, 3:20pm
You could (should) change the declaration and
declare them all as string. The kernel function takes 4 strings (all byval) : LPCTSTR = constant and zero terminated character pointers I have no idea what "Any" is (I'm not familiar with VB) but it somehow looks not right there. The called function is not an interpreter function but a compiled C function. C functions will not check the actual type of the VB variable but expect to be called with the correct type. -- "_ | /\ \ / __/ /_ VB INI Functions "Compile Error: Type Mismatch"Dec 29, 2001, 3:28pm
one more hint :
The kernel function returns a BOOL, that is an integer. It is 0 (false) when the function failed. I don't know if it makes any difference for the VB, but if you try to find an error it might be helpful to see if the function itself succeeded. -- "_ | /\ \ / __/ /_ Help getting startedJan 11, 2002, 8:50pm
The portability of Java does not help in the AW environment,
because the AW libraries have not been ported. Coming from C it is really easy to do C++, once you know how OO people design, you can use C++ and plain C where either of them has its strengths. Borland, M$ (or the free Watcom http://www.openwatcom.org) : Watcom is the best compiler, but the IDE is not good. If you are an editor person and no mouse clicker, this is the best choice, but windows GUI developement is not really fun with Watcom. M$ is quite bloatet, but comes with interfaces to all kinds of stuff (including crap) that can be used in windows. Design of a windows GUI is way easier than with Watcom, but for everything else I prefer Watcom. I don't know BC++ so I cannot say much about it. I know that people write efficient programs with it and it's cheaper than M$. Going from C++ to Java is not a big act, just in case you need it somewhen later. Another option is Delphi, some make bots with that. [View Quote] -- "_ | /\ \ / __/ /_ ocx and libJan 28, 2002, 11:27pm
The OCX will be necessary and I think it's necessary to
register it, either with regsrv32.exe or as described here => http://www.vbworld.com/activex/tip50.html The OCX overlays the AW functions, like a wrapper. It supplies the VB application with a special calling interface and informations about parameters and return value types of the functions that the OCX exports. The LIB itself will _not_ be necessary in your distribution. LIB has a (static) link-level interface, whereas the OCX has a modified dynamic linking interface. The LIB can only be used in compiler languages. An OCX can use a DLL or already contain the LIB, depending on the way the developer of the OCX designed it. Refer to the OCX documentation, that should tell you if the AW.DLL is needed or if the basic AW functions are linked static. [View Quote] -- "_ | /\ \ / __/ /_ ocx and libJan 29, 2002, 3:33am
That is complete nonsense
1. a LIB can ONLY be used to compile it into a program so you never need it outside 2. an OCX (and DLL) can not be compiled into a program at all, so you always need it outside [View Quote] -- "_ | /\ \ / __/ /_ ocx and libJan 29, 2002, 9:56pm
I am very sure that even M$ got that.
A LIB has no header that allows dynamic loading, it has a lot of relocation informations and external references to other library functions in it. Even if you would load it into memory, you could not do anything with it, because the references cannot be resolved on runtime, because the symbols of the referenced entities are not available to the operating system. An OCX has a loader like an EXE file (MZ...) (or a DLL) that allows to load it as a module. It is a fully compiled program with no external references except for DLLs or other OCXs and provides a list of special entries with informations about the exported functions that can be called from outside. [View Quote] -- "_ | /\ \ / __/ /_ We are moving our servers!!Mar 20, 2002, 4:30am
encryptionApr 5, 2002, 6:48pm
Problem today is, that you rarely find source that deals
with the problem you want to solve. Most source deals with windows and GUI, and for a newbie it isn't easy to filter the 10% of the code, that really does something useful. [View Quote] Xealgot FTP TransferingFeb 16, 2001, 6:56pm
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------5FCAEF975A275BD16480E770 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm not familiar with your bots scripting language but I bet it can write out text to a file. Asking the command line FTP for help reveals that it can use response files - that is it can be operated without user interaction and read its commands from a file. Putting both together should be a way to transfer files. xelag schrieb: > > Xelagots don't have the FTP protocol, so the answer is no :) > [View Quote] begin:vcard n:Hatzenberger;Volker x-mozilla-html:FALSE url:oct31.de adr:;;Bornheimer Strasse 15;Bonn;;53111;Germany version:2.1 email;internet:vha at oct31.de end:vcard --------------5FCAEF975A275BD16480E770-- something strange about the SDKJun 4, 2002, 4:13pm
I haven't used the new SDK yet, but I'm curious :
1. the Aw_static.lib seems to reference WS2_32.dll (guess : WS stands for wsock?) 2. in aw.h I see : /* attributes below are not used by the SDK */ AW_CONTACT_NUMBER, ... but in Aw_static.lib I find _handle_contact_state Maybe undocumented features, entry points or callback functions, stuff that isn't in the DLL? Reading Cache IDX / DAT'sJun 14, 2002, 6:15pm
As far as I know, Andras uses the original C-Tree libraries,
but http://www.faircom.com/sales/pricing2.shtml ... This code accesses the telegram.dat through telegram.idx, maybe this helps. It is my telegram to text converter. #include <stdio.h> #include <stdlib.h> #include <time.h> #include <memory.h> #pragma pack (1) typedef struct { unsigned long Follow; long Dummy; short Anz; char Dummy1[7]; } BlockHead; typedef struct { unsigned char IsRead; unsigned long Offset; time_t Timestamp; unsigned long Receiver; char Sender[17]; } IdxEntry; typedef struct { unsigned short fafa; unsigned long Len; unsigned long Len1; unsigned char Dummy; } DatEntry; main () { FILE *idx, *dat, *txt; IdxEntry sIdx; DatEntry sDat; BlockHead sBlock; char Buffer[512]; unsigned long Count=0L, BlockStart=0x0200; struct tm sGMT; short i; if (!(idx = fopen ("telegram.idx", "rb"))) { fputs ("Hey, where's telegram.idx ???", stderr); exit(-1); } if (!(dat = fopen ("telegram.dat", "rb"))) { fputs ("Hey, where's telegram.dat ???", stderr); exit(-1); } if (!(txt = fopen ("telegram.txt", "wt"))) { fputs ("ARGH, couldn't create telegram.txt !", stderr); exit(-1); } while ((BlockStart>0) && ! fseek (idx, BlockStart, SEEK_SET) ) { if (!fread (&sBlock, 1, sizeof (sBlock), idx)) break; for (i=0; i<sBlock.Anz; i++) { memset (&sIdx, 0, sizeof (sIdx)); memset (&sDat, 0, sizeof (sDat)); memset (Buffer, 0, sizeof (Buffer)); fread (&sIdx, 1, sizeof (sIdx)-1, idx); Count ++; sIdx.Sender[16]='\0'; _gmtime (&sIdx.Timestamp, &sGMT); fprintf (txt, "%04d-%02d-%02d\t%2d:%02d:%02d\t" , sGMT.tm_year+1900, sGMT.tm_mon+1, sGMT.tm_mday , sGMT.tm_hour, sGMT.tm_min, sGMT.tm_sec); fprintf (txt, "%-16s\t%ld\n", sIdx.Sender, sIdx.Receiver); fseek (dat, sIdx.Offset, SEEK_SET); fread (&sDat, 1, sizeof (sDat), dat); fread (Buffer, min (sizeof (Buffer), sDat.Len1-1), 1, dat); fprintf (txt, "%s\n\n", Buffer); } BlockStart = sBlock.Follow; } fclose (txt); fclose (dat); fclose (idx); printf ("%d telegrams converted\n", Count); } [View Quote] Reading Cache IDX / DAT'sJun 15, 2002, 4:10am
The structs directly represent the internal file structure
of the IDX/DAT headers and entries. That's why you can just use one "read" command to fetch the informations at once instead of reading each variable separate. btw.: in C++ structs still are useful [View Quote] HiJun 15, 2002, 1:57am
Bot object queries sure can be saved to a file and be reloaded,
all bots with building capabilities do that. Format is usually the propdump format that Mauz (http://mauz.info) describes on her worldbuilders page. The "sequence numbers", together with the X and Z value of a query, can be calculated from the location of the object, that is part of the propdump, so actually the feature is already implemented, somehow. [View Quote] Once again..Feb 21, 2001, 1:31pm
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------8C2141BC45FB71A659923BCD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Not sure how that is handled in US but here asking people to do something illegal is illegal too. Here are 2 legal ways, better you's try them: http://cui.unige.ch/langlist http://www.idiom.com/free-compilers/ awusa schrieb: > > Can someone, put up a C++ or VB compler on a Warez site or something, and give > it to ppl? > [View Quote] begin:vcard n:Hatzenberger;Volker x-mozilla-html:FALSE url:oct31.de adr:;;Bornheimer Strasse 15;Bonn;;53111;Germany version:2.1 email;internet:vha at oct31.de end:vcard --------------8C2141BC45FB71A659923BCD-- Once again..Feb 26, 2001, 1:12am
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------1903A863CCD4C8108BFBEDB8 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I will send you an empty CDRW if you make a house cleaner bot lanezeri schrieb: > > Impossible.. nothing like that could I make to fit on a floppy.. > > -- > - = [ T e c h n o ] = - > http://wt.s5.com > - = [ S t u f f - X ] = - > http://www.stuffx.com/aw --------------1903A863CCD4C8108BFBEDB8 Content-Type: text/x-vcard; charset=us-ascii; name="vha.vcf" Content-Transfer-Encoding: 7bit Content-Description: Visitenkarte für Volker Hatzenberger Content-Disposition: attachment; filename="vha.vcf" begin:vcard n:Hatzenberger;Volker x-mozilla-html:FALSE url:oct31.de adr:;;Bornheimer Strasse 15;Bonn;;53111;Germany version:2.1 email;internet:vha at oct31.de end:vcard --------------1903A863CCD4C8108BFBEDB8-- Once again..Feb 26, 2001, 4:38pm
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------A240D90671C11C4EBB1C8C1B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit LOL lanezeri schrieb: > > 2) C++ is for games not applications, AW was made in C++ it is a game.. > applications are made mostly in VB unless they are huge like AOL. > > -- > - = [ T e c h n o ] = - > http://wt.s5.com > - = [ S t u f f - X ] = - > http://www.stuffx.com/aw --------------A240D90671C11C4EBB1C8C1B Content-Type: text/x-vcard; charset=us-ascii; name="vha.vcf" Content-Transfer-Encoding: 7bit Content-Description: Visitenkarte für Volker Hatzenberger Content-Disposition: attachment; filename="vha.vcf" begin:vcard n:Hatzenberger;Volker x-mozilla-html:FALSE url:oct31.de adr:;;Bornheimer Strasse 15;Bonn;;53111;Germany version:2.1 email;internet:vha at oct31.de end:vcard --------------A240D90671C11C4EBB1C8C1B-- Once again..Feb 27, 2001, 2:10pm
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------3F9FC78146E7A0653B5A2FB6 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Grrr, that wasn't me!!! nova schrieb: > > why does so many people compare aw to a game? > gmes have points of some sort ie hit points in a rpg or guns that kill a > player like unreal or some other sort of thing. > aw has none of this yeh some have made rpgs inside ow aw but that does not > make aw a game in anyway. [View Quote] begin:vcard n:Hatzenberger;Volker x-mozilla-html:FALSE url:oct31.de adr:;;Bornheimer Strasse 15;Bonn;;53111;Germany version:2.1 email;internet:vha at oct31.de end:vcard --------------3F9FC78146E7A0653B5A2FB6-- Once again..Feb 27, 2001, 2:31pm
Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------BF4AE73AE2BDA928479A8FC3 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Pascal is a much better language for starters, it has very strict rules and standards (VB, like all Basic-dialects, isn't a standard, not portable) and you will find Pascal compilers on nearly every machine. Ok, Turbo Pascal (later Borland Pascal, now Delphi) was not really Pascal but it was cheap, and someone who learned to do structures programming with Pascal will write easy-to-read programs in other languages too. That doesn't mean that you HAVE to learn a new language after you learned Pascal/Delphi - they can be used for large projects - but most projects for companies will require Cobol (I know, hard to believe), C/C++ or Java, sometimes PL1. The only area where VB might be helpful is in smaller companies that need VB and VB-Script for MS/Office enhancements. I agree, that VB is good for hobbyists - but most good developers start as hobbyists, so it's good to think ahead. p.s.: I started with Basic too, but that was a time when no compilers were available for hobbyists (not for small $$$). nova schrieb: > > Vis basic is ment as a stepping stone for other languages. > Thats realy whats its ment as and for the hobbyist. > I wish i hadnt stoped programing at good old basic but i wasnt realy in to > puters when qbasic and vis basic came out if i had been id likly be doing > alot of c++ now but i dont want to learn programing now as i dont realy have > much time with my work in true space and 3d studio max and rr job. > so i just realy on people who do program c++ for bots etc. [View Quote] begin:vcard n:Hatzenberger;Volker x-mozilla-html:FALSE url:oct31.de adr:;;Bornheimer Strasse 15;Bonn;;53111;Germany version:2.1 email;internet:vha at oct31.de end:vcard --------------BF4AE73AE2BDA928479A8FC3-- Converting a Co-ord String to API UsableJul 17, 2002, 7:13pm
I'm not sure what split() in VB does, but C has more
than one function to break a string into parts, for example strtok() and sscanf(). It could look somehow like this : char SNString[30], EWString[30], World[30], AString; sscanf (InputString, "%s %s %s %s", World, SNString, EWString, AString); A function to get the coord's integer values from the broken out parts is atoi() To get the last characters (the direction), I would use array addressing together with strlen(), e.g. int SNValue; SNValue = atoi (SNString); The atoi() stops at the first non-numeric character, so there's no need to remove anything. if ( (SNString[strlen(SNString)-1] | 0x20) == 's') SNValue = -SNValue; The "| 0x20" makes the character lowercase, independant from what the user typed. Converting a Co-ord String to API UsableJul 18, 2002, 2:59am
Converting a Co-ord String to API UsableJul 18, 2002, 3:01am
The advantage of incomplete snippets over a
ready-made solution : The developer has to deal with the why and the how and will easier understand what he implements :) [View Quote] Converting a Co-ord String to API UsableJul 18, 2002, 10:17pm
HELP My VB bot won't log onJul 27, 2002, 2:52am
[C++ SDK] awsdk1.cpp(171) : error C2065: 'aw_console_messsage' : undeclared identifierAug 9, 2002, 5:29am
[C++ SDK] awsdk1.cpp(171) : error C2065: 'aw_console_messsage' : undeclared identifierAug 9, 2002, 5:51am
New to C++, how to make it work with an interface?Aug 10, 2002, 2:45am
If your project is called "xyz" it will create a file
"xyz.h". Edit that and find the line #include "resource.h" close to the top. Behind this line insert your include for aw.h . [View Quote] |