Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2024, 11:17:36 PM
Home Help Login Register
News: Trouble in Terrorist Town? Site here, forum here.

Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Replacing Spawns not working
Pages: [1]
Author Topic: Replacing Spawns not working  (Read 3763 times)
PAL-18
Poster

Posts: 36



« on: March 26, 2011, 02:37:40 AM »

All my weapon scripts dont replace spawns, even though they all have setting: replacespawns 1 defined.

When the map loads, i get the following error in the server console:

L 03/25/2011 - 22:30:46: Lua Error: Invalid line 4 in ../maps/MAPNAME
_ttt.txt
Invalid line 4 in ../maps/MAPNAME_ttt.txt


Line 4 coincides with the replace spawn command.

Will this be fixed?
« Last Edit: March 26, 2011, 02:41:37 AM by PAL-18 »
Mr. Gash
Poster

Posts: 382


www.nonerdsjustgeeks.com


« Reply #1 on: March 26, 2011, 07:17:39 AM »

What version are you using?
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #2 on: March 26, 2011, 08:52:23 AM »

Did you manually edit the scripts? It sounds like you may have spaces instead of a tab in the "setting:" line. It has to be "setting:[TAB]replacespawns 1". Some editors automatically convert tabs to spaces, notepad won't.

If I load up a CS:S map, all of which use replacespawns in their scripts, it works fine without errors.
PAL-18
Poster

Posts: 36



« Reply #3 on: March 26, 2011, 03:13:42 PM »

While testing the scripts, there is a tab between setting: and replacespawns.  I didnt manually edit any scripts; they were all created ingame with the TTT tool.

I'm using the latest version (v24).

I generated the scripts in windows and the server is linux.  Could that be causing the problem?  If so, how do i fix it?
« Last Edit: March 26, 2011, 03:23:54 PM by PAL-18 »
Bad King Urgrain
Administrator
*****
Posts: 12276



« Reply #4 on: March 26, 2011, 10:48:26 PM »

That could be the issue. The files were generated on windows and will have windows-style line ending markers, which doesn't have to be a problem if gmod handles it but knowing garry he probably didn't do anything about that for the linux build of gmod. You'll have to modify the scripts to use linux-style line endings.

If you have shell access on the linux box, you could navigate to where the scripts are and run:
dos2unix *.txt

That will convert all scripts to linux-style line endings.

I think the dos2unix/unix2dos utilities are standard on all linux distros. An alternative is using an editor like notepad++ to convert them (Edit -> EOL Conversion -> Unix format). Most text editors that are a step above basic notepad will have a function like that.
PAL-18
Poster

Posts: 36



« Reply #5 on: March 27, 2011, 04:20:51 AM »

That fixed it :D

Thanks!
Pages: [1]
Zombie Master  |  Other  |  Trouble in Terrorist Town  |  Topic: Replacing Spawns not working « previous next »
Jump to:  


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.011 seconds with 18 queries.