Welcome, Guest. Please login or register.

Author Topic: Where's da bug  (Read 3247 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Where's da bug
« on: August 31, 2004, 09:19:40 PM »
if (!(buffertask = (MsgPort *)CreateProc(Buffertaskname, 0L, buffertaskSegList, 1000L)))
  {printf("coudn't create MDBuffer/n");
   unloadseg......}
.........
.......


I'm getting Error 76 identifier expected or something with VBCC..

By the way, do I really need to cast it (eg. (MsgPort *) ) ? I was getting another error before I added that. The variable holding the result (buffertask) is declared as struct MsgPort *buffertask so I can't see what was the problem.
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Where's da bug
« Reply #1 on: August 31, 2004, 09:40:31 PM »
@Slash

Yes, CreatePro is obsolete but I want the code to also conditionally run on 1.3 :-)

I tried it with a struc process instead and it seems to work.
I can't really say if it works because till now VBCC was outputting the errors then crashing. Now it's just crashing after I run it so I assume there are no errors left..(don't bother asnwering I'm gonna start a new thread about my VBCC crashes.)..
 
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Where's da bug
« Reply #2 on: August 31, 2004, 09:59:45 PM »
I'm curious to know if it is really necessary to do the casting to struct *process when using CreatePro, or CreateNewProc...
In theory both should return that type so it shouldn't be necessary right?
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Where's da bug
« Reply #3 on: August 31, 2004, 10:23:09 PM »
@itix

Ahh, yes!
Mine too!
So that's probably why casting is needed
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Where's da bug
« Reply #4 on: August 31, 2004, 10:29:26 PM »
Hmm, I checked the structures and the Process structure starts with a task structure followed by the MsgPort.
CreateProc returns the MsgPort according to the docs, so I think if I cast it fo a Process it's an error. Should be a MsgPort after all. Which brings me back to my first error(first post)!!
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Where's da bug
« Reply #5 on: September 01, 2004, 01:03:55 AM »
@itix
yes, silly me....forgot to add the type "struct"  to the cast... 8-)
\\"We made Amiga, they {bleep}ed it up\\"
 

Offline JoseTopic starter

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2871
    • Show all replies
Re: Where's da bug
« Reply #6 on: September 01, 2004, 01:30:34 AM »
@Karlos

Usefull. Shouldn't that be a long instead of a byte?
\\"We made Amiga, they {bleep}ed it up\\"