(New message)
Subject review (reverse sequence)
Posted by
Nargsbrood
(54 posts) bio
Date
Sat 27 Oct 2007 01:02 AM (UTC) [ quote
] Amended on Sat 27 Oct 2007 01:12 AM (UTC) by Nargsbrood
Message
nevermind - i believe I may have thought of why it's not working. I am assigning the address of fp to ->atlas[x].area and so if the value of fp is changing but atlas that points to it is still pointing to the same location.
the last thing that fp gets assigned is the word END and so every element in my array is pointing to FP. they'll all always have the same value since they all point to the same address.
i need to malloc some space for it and then do a string copy into it? kiddie halloween stuff now, i'll try this later.
sry for the trouble top
Posted by
Nargsbrood
(54 posts) bio
Date
Fri 26 Oct 2007 11:44 PM (UTC) [ quote
] Amended on Fri 26 Oct 2007 11:45 PM (UTC) by Nargsbrood
Message
I am having an issue with reading in from a player file... the section of the player file that i am trying to read is the text in bold below:
Spell 100 'weaken'
Spell 100 'winter mist'
Spell 100 'word of recall'
Spell 100 'Wrath of Dominus'
Killed 24836 1
Killed 2407 1
Killed 21045 1
Killed 4000 1
Map 'Dwarven Daycare'
Map 'Haon Dor'
Map 'Tullfuhrzky Manor'
Map 'Sewer'
Map 'The Astral Plane'
MaxColors 111
i tried both of the below to read in the map lines:
if( !strcmp( word, "Map" ) )
{
ch->pcdata->atlas[mapcnt++].area = fread_word( fp );
fMatch = TRUE;
break;
}
AND
KEY( "Map", ch->pcdata->atlas[mapcnt++].area, fread_word( fp ) ) ;
but they both produce the same result. When I print the contents that were saved into the ch->pcdata->atlas array I get
Atlas
-----------
END
END
END
END
END
The number of items read from the player file is correct but the contents is wrong.
Why is it saving the contents as 'End' ?
Any help is much appreciated 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.
1,015 views.
Reply to this subject
Start a new subject
  Refresh page
Go to topic:
(Choose topic)
Area Editor: Bug reports
Area Editor: General
Area Editor: News and updates
Area Editor: Suggestions
Area Editor: Tips and tricks
Dawn of Time: Administration
Dawn of Time: Configuration
Dawn of Time: Installing/compiling the server
Dawn of Time: New Dawn Muds Announcements
Dawn of Time: Playing
Dawn of Time: What is Dawn of Time (Dawn)?
Electronics: Microprocessors
Electronics: Operational Amplifiers
Forum: About
Forum: Announcements
Forum: Mailing other users
Forum: Problems
Forum: Registering
Forum: Searching
Forum: Subscribing
Forum: Suggestions
Forum: Test
Forum: Time zones / time display
Forum software: Administration
Forum software: Installation
MUDs: Announcements
MUDs: General
MUDs: MUD Design Concepts
MUSHclient: Announcements
MUSHclient: Beta testing
MUSHclient: Bug reports
MUSHclient: Development
MUSHclient: General
MUSHclient: Getting Started
MUSHclient: International
MUSHclient: Jscript
MUSHclient: Lua
MUSHclient: Miniwindows
MUSHclient: MXP and Pueblo
MUSHclient: Perlscript
MUSHclient: Plugins
MUSHclient: Python
MUSHclient: Suggestions
MUSHclient: Tips and tricks
MUSHclient: VBscript
MUSHclient: Wine
PennMUSH: Compiling the server
PennMUSH: Running the server
Programming: General
Programming: STL
Quilting: General
ROM: Compiling the server
ROM: Running the server
SMAUG: Commands
SMAUG: Compiling the server
SMAUG: Lua
SMAUG: Running the server
SMAUG: SMAUG coding
Search the forum
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )