[Windows] Bug re: folders in a TAR file?

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

[Windows] Bug re: folders in a TAR file?

Post by Zutty »

Hi all,

I think I may have found a bug. I use subfolders to keep my clases organised. I include them with lines such as this...

Code: Select all

require("graph/Edge.nut");
This works fine if the AI is run from a folder. However if I try to run the AI from a .tar file, I get the following error...

Code: Select all

dbg: [misc] [squirrel] Failed to compile '%aitar%pathzilla\graph/Edge.nut'
dbg: [ai] [1] [S] Your script made an error: cannot open the file
I was able to fix that by changing the require lines to use the other slash...

Code: Select all

require("graph\\Edge.nut");
But then this means it wont work in Linux, meaning I can't participate in the tournament. I really don't want to have to maintain two separate files either.

Can we please have a fix for this? Unless its something I'm doing wrong.

Thanks :)

Edit: I have uploaded a TAR that should trigger this bug (on Windows ofcourse).
Attachments
pathzilla.tar
Pathzilla using Unix-style slashes
(497.5 KiB) Downloaded 90 times
PathZilla - A networking AI - Now with tram support.
TrueBrain
OpenTTD Developer
OpenTTD Developer
Posts: 1370
Joined: 31 May 2004 09:21

Re: [Windows] Bug re: folders in a TAR file?

Post by TrueBrain »

Fixed in latest SVN. Will be in binaries in 21 hours. You should use '/' for all file references, which is silently converted to '\\' on Windows (but you don't have to worry about that with latest commit :) ).
The only thing necessary for the triumph of evil is for good men to do nothing.
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: [Windows] Bug re: folders in a TAR file?

Post by Zutty »

THAT WAS FAST! You're my new hero TrueBrain!! :bow:
PathZilla - A networking AI - Now with tram support.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 10 guests