ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
Having a header problem (Sdk)
Having a header problem // SdkvelenoMar 7, 1999, 2:56pm
I'm trying to initialize a bot with all the coding in the header. The
bot won't initilize the API and keeps coming up with reason 444. The API initialization is called in the c prog as api_start and the coding in the header is: void api_start(void) { int rc; printf("Attempting to initialize API..."); if(rc = aw_init(AW_BUILD)) { printf("Failed\nUnable to initialize API (reason %d)\n", rc); rc_errors(rc); exit (1); } else printf("Success\n"); } Why is this not working? dthknightMar 7, 1999, 3:11pm
if it helps anyone, reason 444 is RC_NOT_INITIALIZED. No clue myself cos I
don't actually program SDK bots, and only know a bit of C/C++... [View Quote] dalthanMar 7, 1999, 3:15pm
I kew that....I don't know why it's doing that.....the coding should work
[View Quote] > if it helps anyone, reason 444 is RC_NOT_INITIALIZED. No clue myself cos I > don't actually program SDK bots, and only know a bit of C/C++... > [View Quote] baggisMar 7, 1999, 4:12pm
Hi,
This is an answer I got from Roland Vilett when asking about AW.DLL versions : ------------------------------------ The local DLL version is provided by the #define AW_BUILD in the aw.h file. You'll know that AW_BUILD is the same as the DLL build if aw_init (AW_BUILD) returns 0, since aw_init() will fail if the build number passed in is not the same as the DLL's build number. ------------------------------------ In other words, check that you have the latest version of AW.DLL ( and AW.H ) :-) /Baggis > walter knupeMar 8, 1999, 5:01pm
Since 444 is RC_NOT_INITIALIZED check the following:
1) make sure the header file aw.h does correspond to the aw.lib and aw.dll you use. 2) see if the error is actually thrown by the code you provided. it might be that your api_start is not called for some reason, and then EVERY other function would throw 444 as the error code. e.g. if you program via copy&paste (as all good programmers do it, its called "code reuse" :) ), you might have an aw_login() or aw_create() somewhere which on failure prints out "Failed\nUnable to initialize API (reason %d)\n", causing you to look at the wrong place. Walter aka Faber Veleno schrieb in Nachricht <36E2AFD0.1A45A411 at hiwaay.net>... >I'm trying to initialize a bot with all the coding in the header. The >bot won't initilize the API and keeps coming up with reason 444. >The API initialization is called in the c prog as api_start and the >coding in the header is: >void api_start(void) >{ > int rc; > printf("Attempting to initialize API..."); > if(rc = aw_init(AW_BUILD)) { > printf("Failed\nUnable to initialize API (reason %d)\n", rc); > rc_errors(rc); > exit (1); > } else printf("Success\n"); >} >Why is this not working? > |