[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  ROM
. -> [Folder]  Compiling the server
. . -> [Subject]  rom24b6olc help

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: rom24b6olc help
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Dave   Australia  (93 posts)  [Biography] bio
Date Mon 03 Mar 2003 07:23 AM (UTC)  quote  ]

Amended on Mon 03 Mar 2003 07:24 AM (UTC) by Dave

Message
I'll take a wild stab at it:
char *spec_string(SPEC_FUN *fun) /* OLC */
{
    int cmd;

    for (cmd = 0; spec_table[cmd].function[0] != '\0'; cmd++)
        if (fun == spec_table[cmd].function)
            return spec_table[cmd].name;

    return 0;
}
Okay. so fun is a pointer to a SPEC_FUN, which I'm assuming isn't an array, and you compare fun to spec_table[cmd].function, so I'm assuming that .function is also a pointer to a SPEC_FUN.. so your problem would be "spec_table[cmd].function[0] != '\0'". Try changing it to "spec_table[cmd].function != NULL" perhaps? Look at the bottom of spec_table, and see how the last element defines itself. Hope this helps.

Dave
[Go to top] top

Posted by To4ri2n0   (2 posts)  [Biography] bio
Date Thu 27 Feb 2003 12:26 AM (UTC)  quote  ]
Message
I use win98 and cygwin, I got rom24b4a to go with no probs just some simple hacking of the code but when I tried to patch olc to it I got nothing. So now I'm trying to use rom24b6olc and I can't get it to compile. Heres the output:

special.c: In function 'spec string':
special.c:1037: subscripted value is neither array nor pointer
make: *** [special.o] Error1

Here is special.c 1037:

for ( cmd = 0; spec_table[cmd].function[0] != '\0'; cmd++ )

Here is the whole bunch that contains 1037:

/* OLC Inserted */
/*****************************************************************************
Name: spec_string
Purpose: Given a function, return the appropriate name.
Called by: <???>
****************************************************************************/
char *spec_string( SPEC_FUN *fun ) /* OLC */
{
int cmd;

for ( cmd = 0; spec_table[cmd].function[0] != '\0'; cmd++ )
if ( fun == spec_table[cmd].function )
return spec_table[cmd].name;

return 0;
}

I have seen this prob posted to a number of different forums and on everyone the replys do not even try to answer the prob. So if you know what I can do to make this work PLEASE tell me. Thanks
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


2,074 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]