• Welcome to Valhalla Legends Archive.
 

LoadResData()

Started by brew, March 18, 2007, 10:10 AM

Previous topic - Next topic

brew

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
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Barabajagal

Where you have the number 10 is where the resource type (which is a STRING) goes.

brew

I want to load it as a byte array
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P

Barabajagal

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") .

brew

#4
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.
<3 Zorm
Quote[01:08:05 AM] <@Zorm> haha, me get pussy? don't kid yourself quik
Scio te esse, sed quid sumne? :P