Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Tiberian Technologies / Blackhand Studios » Tiberian Technologies Forum » Set_Map errors?
Re: Set_Map errors? [message #464422 is a reply to message #464388] Wed, 14 March 2012 15:53 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
I had the exact same issues with Set_Map() and mlistc with beta 3. This is what I used for Set_Map(), mlistc was set manually, the behavior for Set_Map() and mlistc is different:

void SetNextMap::Activate_IRC(StringClass Nick, StringClass Channel, Tokenizer Msg)
{
	if (Msg.Size() != 2)
	{
		IRC::Send("PRIVMSG %s :usage !setnextmap <name>.\n", Channel);
		return;
	}
	int NextID = Get_Current_Map_Index() + 1;

	const char *temp = Get_Map(NextID);
	if( temp == NULL)
	{
		NextID = 0;
	}
		
	for(int i = 0;; i++)
	{
		const char *x = Get_Map(i);
		if( x != NULL)
		{
			if (stristr(x, Msg[2]))
			{
				if (Set_Map(x, NextID))
				{
					IRC::Send("PRIVMSG %s :The next map was set to %s.\n", Channel, x);
				}
				else
				{
					IRC::Send("PRIVMSG %s :Unknown error trying to set map to %s.\n", Channel, x);
				}
				return;
			}
		}
		else
		{
			break;
		}
	}
	IRC::SendC(Channel, "Map not found.");
}


I've got a a server directory setup that can be used to reproduce the issue, if needed I can upload it.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases

[Updated on: Wed, 14 March 2012 15:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bug involving custom objects and mslistc
Next Topic: Resource Manager
Goto Forum:
  


Current Time: Tue Dec 17 05:40:26 MST 2024

Total time taken to generate the page: 0.00818 seconds