How is it possible to let the game run even when the user does not have the AppID purchased and/or installed. In Garry's Mod it works fine in just showing error models, but if I don't error check the Mount Content calls in my mod then I get a popup informing me the AppID, is missing,etc. Does he possible search for the .gcf file to see if one exists for that AppID and only try to mount if one was found?
Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jake Breen Sent: Saturday, February 02, 2008 8:29 PM To: [email protected] Subject: Re: [hlcoders] Mounting GCFs in OB Yay! Thanks a bunch! -Jake Tom Leighton wrote: > that there's your problem, > > You're placing it so that if the filesystem factory doesn't initialize > you run the one line. > (If its not compiling debug, this is what happens:) > > >> RUNS >> if ( (filesystem = (IFileSystem > *)appSystemFactory(FILESYSTEM_INTERFACE_VERSION, NULL)) == NULL ) > #ifndef DEBUG > >> RUNS If filesystem == NULL >> > filesystem->AddSearchPath("hl2mp", "GAME"); > >> RUNS ANYWAY >> filesystem->AddSearchPath("hl2", "GAME"); > >> RUNS ANYWAY >> > filesystem->AddSearchPath("episodic", "GAME"); > >> RUNS ANYWAY >> filesystem->AddSearchPath("ep2", > "GAME"); > >> RUNS ANYWAY >> filesystem->MountSteamContent( 220 ); > >> RUNS ANYWAY >> filesystem->MountSteamContent( 320 ); > >> RUNS ANYWAY >> filesystem->MountSteamContent( 380 ); > >> RUNS ANYWAY >> filesystem->MountSteamContent( 420 ); > #endif // DEBUG > >> Return false anyway... crash. >> return false; > > You should mount your files at the end of the main Init / DLLInit > function before the end return true, checking whether the GCF was > mounted or not: > > filesystem->AddSearchPath("hl2mp", "GAME"); > filesystem->AddSearchPath("hl2", "GAME"); > filesystem->AddSearchPath("episodic", "GAME"); > filesystem->AddSearchPath("ep2", "GAME"); > > if( filesystem->MountSteamContent( 220 ) == > FILESYSTEM_MOUNT_FAILED || > filesystem->MountSteamContent( 320 ) == > FILESYSTEM_MOUNT_FAILED || > filesystem->MountSteamContent( 380 ) == > FILESYSTEM_MOUNT_FAILED || > filesystem->MountSteamContent( 420 ) == > FILESYSTEM_MOUNT_FAILED ) > { > Error("GCF Mount Failed!"); > return false; > } > >> Still crashes, i have a feeling that I'm not placing it correctly >> >> if ( (filesystem = (IFileSystem >> *)appSystemFactory(FILESYSTEM_INTERFACE_VERSION, NULL)) == NULL ) >> #ifndef DEBUG >> filesystem->AddSearchPath("hl2mp", "GAME"); >> filesystem->AddSearchPath("hl2", "GAME"); >> filesystem->AddSearchPath("episodic", "GAME"); >> filesystem->AddSearchPath("ep2", "GAME"); >> filesystem->MountSteamContent( 220 ); >> filesystem->MountSteamContent( 320 ); >> filesystem->MountSteamContent( 380 ); >> filesystem->MountSteamContent( 420 ); >> #endif // DEBUG >> return false; >> >> Starts on line 684.. >> >> Tom Leighton wrote: >>> Works for me, even in Debug (Where it was broken before :D) >>> >>> filesystem->MountSteamContent( 240 ); >>> >>> >>> >>> Jake Breen wrote: >>>> Nevermind I have come to a conclusion that the old way of mounting >>>> gcfs >>>> in the code does not work with OB, it just crashes the game on >>>> startup...once again sorry for spam o.x >>>> >>>> -Jake >>>> >>>> Jake Breen wrote: >>>>> Fixed..again sorry for spamming this place up o.x >>>>> >>>>> -Jake >>>>> >>>>> Jake Breen wrote: >>>>>> Sorry to spam this up, but didn't do it correctly..now it just >>>>>> seems to >>>>>> crash on launch. >>>>>> >>>>>> -Jake >>>>>> >>>>>> Jake Breen wrote: >>>>>>> Nevermind I spoke to soon, I got it (I think..) >>>>>>> >>>>>>> -Jake >>>>>>> >>>>>>> Jake Breen wrote: >>>>>>>> I was wondering how you would mount gcf in the code. Now I'm >>>>>>>> not an >>>>>>>> expert or anything, but i'm not an complete idiot :P >>>>>>>> and http://developer.valvesoftware.com/wiki/FileSystem_Snippet >>>>>>>> seems to >>>>>>>> be outdated... >>>>>>>> >>>>>>>> -Jake >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> To unsubscribe, edit your list preferences, or view the list >>>>>>>> archives, >>>>>>>> please visit: >>>>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> To unsubscribe, edit your list preferences, or view the list >>>>>>> archives, >>>>>>> please visit: >>>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> To unsubscribe, edit your list preferences, or view the list >>>>>> archives, >>>>>> please visit: >>>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>>>> >>>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> To unsubscribe, edit your list preferences, or view the list >>>>> archives, >>>>> please visit: >>>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> To unsubscribe, edit your list preferences, or view the list archives, >>>> please visit: >>>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>>> >>>> >>> >>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list archives, >>> please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlcoders >>> >>> >> >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list archives, >> please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlcoders >> >> > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

