Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: brew on March 18, 2007, 10:10 AM

Title: LoadResData()
Post by: brew on March 18, 2007, 10:10 AM
Hi, i'm having trouble with the LoadResData() function. for some reason, when i try to do LoadResData(101, 10) it apparently can't find resource 101, but thats bullshit because it's right there. any ideas? I already look in msdn and couldn't find any possible reasons for this
Title: Re: LoadResData()
Post by: Barabajagal on March 18, 2007, 04:24 PM
Where you have the number 10 is where the resource type (which is a STRING) goes.
Title: Re: LoadResData()
Post by: brew on March 19, 2007, 03:52 PM
I want to load it as a byte array
Title: Re: LoadResData()
Post by: Barabajagal on March 19, 2007, 03:57 PM
I don't think you understood my statement. It works like this: LoadResData(ID, Type). ID is the Identification Number of the resource. Type is the resource type. For instance, you may have a wave file labeled as 108, with a type of "WAVE". You use LoadResData to load it into a byte array like so: bArray() = LoadResData(108, "WAVE") .
Title: Re: LoadResData()
Post by: brew on March 19, 2007, 08:20 PM
Ohhhh, so anotherwords you're not supposed to use the const value of the resource type, but a string literal? I think i know what you mean. It works perfect now, thanks, Ripple.