Welcome, Guest. Please login or register.

Author Topic: Blllludy devices!  (Read 6216 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Steady

Re: Blllludy devices!
« on: January 31, 2003, 07:20:36 PM »
Hi there Iamaboringperson,

   Can you please list the error messages you are getting so we can see what is going on. I'm curious to see what they are.
 

Offline Steady

Re: Blllludy devices!
« Reply #1 on: February 01, 2003, 02:57:05 PM »
I had a quick play and think I've found the source of your problem. It is basically as Karlos pointed out earlier. Casting is your problem.

amiga.lib's CreateExtIO function is expecting to return an IORequest pointer. You are expecting an IOStdReq pointer.

exec.library's OpenDevice function is causing the same problem for you, but in reverse. You should cast as follows assuming your variables are still defined in the same way:

if(!(GameMP=CreatePort("RKM_game_port",0)))
   cleanexit();

if(!(GameIO=(struct IOStdReq *)CreateExtIO(GameMP,sizeof(struct IOStdReq))))
   cleanexit();

if(error=OpenDevice("gameport.device",1,(struct IORequest *)GameIO,0))
   cleanexit();


Hope that helps.
 

Offline Steady

Re: Blllludy devices!
« Reply #2 on: February 02, 2003, 10:53:51 AM »
@Iamaboringperson

Well, I loaded the code in StormC V3 with the 3.9 includes and received the errors you mentioned. The compiler is correct to point out these errors, although some are less tolerant. When I added the casting all errors went away. I know it is a pain, but I think the errors have to be seen to get any further.