Author Topic: Using Command('/map newmap') corrupts Nextmap var?  (Read 894 times)

0 Members and 1 Guest are viewing this topic.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Using Command('/map newmap') corrupts Nextmap var?
« on: March 21, 2010, 08:11:51 am »
The function Command() corrupts the serverside nextmap variable.
I came up with it when working on a !nextmap script. After I implemented a !votemap <map> command it did not work any longer. I changed the Command('/nextmap') to Command('/map <map>'). The map changes, but when I use !nextmap it always jumps back to one map. (The second in the mapslist)
Using it as admin works /:

I have absolutely no idea why, I hope you understand what I wrote :D

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Using Command('/map newmap') corrupts Nextmap var?
« Reply #1 on: March 21, 2010, 08:54:06 am »
Im pretty sure that if you do /map bla ingame it will do the same thing to you.

if targetmap = nextmap then command('/nextmap') else command('/map '+targetmap);


Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Using Command('/map newmap') corrupts Nextmap var?
« Reply #2 on: March 21, 2010, 12:32:09 pm »
/map doesn't change map rotation so you're like playing same map as before.

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Using Command('/map newmap') corrupts Nextmap var?
« Reply #3 on: March 21, 2010, 12:46:05 pm »
Okay, thanx. Then I just stay with !nextmap for now :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Using Command('/map newmap') corrupts Nextmap var?
« Reply #4 on: March 23, 2010, 08:33:39 am »
You can go pro and find next map with same name on mapslist and do some magix to skip to there(the only I can think of at this moment is editing mapslist and reloading it).

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: Using Command('/map newmap') corrupts Nextmap var?
« Reply #5 on: March 23, 2010, 10:11:50 am »
Yeah, I tried it with changing the NextMap variable myself with the way you said, but didn't work to modify. It would work with another var which holds the next map :D