Error for an Option

http://pastebin.com/Z93Yi6Fh

Gives me an error in the


Call DrawResource(Resource_sprite, Alpha, x, y, rec)

on the rec part.

I’m trying to make an option for Semi-Transparent trees. Can someone help? (Turning it off and on.)

NOTE: I have all the Options coded and in place, meaning the on and off switches change Options.STT.

EDIT: Fixed it by added the Options.STT to change the alpha channeling. It’s all good.

What is the error?

Oh, yea. ByRef Argument Type Mismatch.

Make sure the parameter data type for “rec” is the same as the data type of the argument being passed into the method. Below is an example:

public void DrawResource(int x, int y)

{

// do stuff

}

// Valid usage of DrawResource

int x = 5; int y = 10;

DrawResource(x, y);

// Invalid usage of DrawResource

double x = 5; Rectangle y = new Rectangle() { 5, 4, 3, 2 };

DrawResource(x, y);

Error Message: Type mismatch.

I fixed it… thanks anyways tho.

Log in to reply