Re: Set_Map errors? [message #464422 is a reply to message #464388] |
Wed, 14 March 2012 15:53 |
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
|
|
|