.Jar in Ubuntu Problem..

codster62

Member
I have been using Ubuntu for KolMafia lately, and I downloaded the recent .jar version and I can right click and run it with Java, which works fine. But, when I am in there, and I try to load a script that requires other scripts to run(Imports them), It won't work because the .jar is still in a single file therefore there is no default script folder in which to place all scripts in. Anyways, I have been using Wine for Kolmafia because of that, but it's inconveniant for me to wait a week for the latest build... Anybody have an idea that will help me set the latest .jar build of kolmafia up in ubuntu?(Not Wine)...

Thanks!
 

codster62

Member
Ok, so how do I place all of my scripts there? Just copy them to that location or something?

EDIT: I checked it out. Apparently it's like you said and is in the home/hawkster/.kolmafia folder, but I went to the home/hawkster directory and it appears that the folder .kolmafia is hidden. What is the problem here? Why can't I see the folder?

EDIT # 2: Ok, I did a little researching, and if anybody is having this problem with another version of linux or ubuntu, this is how it's solved. :) Go to your home directory, and .kolmafia will be hidden. In order to make it unhidden, use this! Ctrl + H .... This will toggle hidden files. Thanks for the help Veracity.

EDIT # 3: Hmmm. I pasted all my scripts in the .kolmafia/scripts directory but for some odd reason it's still not recognizing they are there... For example, I ran farm.ash, and it said eatdrink.ash could not be found (farm.ash, line 6)...
 
Last edited:

Veracity

Developer
Staff member
Any file or directory starting with a . is hidden. You can see them with "ls -a". Or, you can just "cd ~/.kolmafia/scripts" and be right there.

Let me guess. You are not using the shell? I don't know what program you are using to "go to your home directory" that uses Ctrl-H to toggle hidden files.

The problem with "eatdrink.ash not found" is a bug in farm.ash. We've discussed it elsewhere, but Linux has a case-sensitive file system. If dj_d names his script "EatDrink.ash", then it is his responsibility to include it using that name - not "eatdrink.ash" - if he wants it to work correctly on LInux.
 

codster62

Member
So I just need to change the script to make the cases match up then? Also, I am using the file viewer under ubuntu to view. I don't use the terminal much...

EDIT: Ok, I changed the capitalization on eatdrink, and it is working now. Also, in ubuntu, there is two ways to change directories/view files. You have the "File Browser" and the "Terminal(Name of the Command Line)", and I generally just use the file browser as it's much easier... And in the browser, Control + H will show all hidden files in a folder. Sorry I didn't explain more.

EDIT # 2: Well, I got farm.ash to work, and the new update causes it to speed right along... Anyways I tried ascend.ash, and at first I got the problem EatDrink.ash not found, so I just copied eatdrink.ash and changed capitalization. That worked good as well. But then when I run the script, I get this message.

Undefined reference to function 'eatdrink' (Ascend.ash, line 62)

I thought maybe it was the capitalization that's the problem again, but it's not. Any suggestions?
 
Last edited:

Grotfang

Developer
You have the "File Browser" and the "Terminal(Name of the Command Line)", and I generally just use the file browser as it's much easier...

I disagree. If you use tab and know your own way around your own computer, the shell is a LOT easier and faster.

EDIT # 2: Well, I got farm.ash to work, and the new update causes it to speed right along... Anyways I tried ascend.ash, and at first I got the problem EatDrink.ash not found, so I just copied eatdrink.ash and changed capitalization. That worked good as well. But then when I run the script, I get this message.

Undefined reference to function 'eatdrink' (Ascend.ash, line 62)

Well, line 62 of Ascend.ash refers to a function called eatdrink which is located within EatDrink.ash. Can I suggest redownloading EatDrink.ash, keep its name the same, but change the line in Ascend.ash where it says "import <eatdrink.ash>" to "import <EatDrink.ash>". It should work fine then.
 

codster62

Member
I tried that and it did not work. Maybe it is something dj_d did wrong when updating the script... Let me test it with my .exe version and see if it's the script, or my Ubuntu...
 

codster62

Member
I tried that and it did not work. Maybe it is something dj_d did wrong when updating the script... Let me test it with my .exe version and see if it's the script, or my Ubuntu...


Ok, yep. It doesn't work on .exe version either so that means it is his script that he made an error in when updating, because it did work fine with older version of eatdrink.ash...

Well, I posted the info in that thread, so this thread is most likely now obsolete. :) Thanks for all the help, my problems are fixed except for EatDrink's error.
 
Last edited:

Grotfang

Developer
There is no error. I have just downloaded the most recent mafia build as well as dj_d's most recent Ascend.ash suite.

The problem is at your end, not his.
 

codster62

Member
Hmmm, really? That is weird, because it works fine with the old versions, and I just redownloaded the updated eatdrink.ash, and it's still not working. How come it's working with the old version of his script, but not the new one?
 

Spiny

Member
Hmmm, really? That is weird, because it works fine with the old versions, and I just redownloaded the updated eatdrink.ash, and it's still not working. How come it's working with the old version of his script, but not the new one?

You are on ubuntu. The script name should be EatDrink.ash.
The lines in Ascend.ash and farm.ash and wherever else that imports EatDrink.ash should say "import <EatDrink.ash>" Do not rename the script to eatdrink.ash. Instead adjust the lines in the scripts that say "import <eatdrink.ash>" to say "import <EatDrink.ash>"
 

codster62

Member
Hehe. We figured out the problem. Everything works now... The only thing that doesn't work is Dj_d's update of EatDrink.ash...Download it on the LAST page of his thread. It should yield the same problem for you spiny. Everything works fine now with the old version of EatDrink.ash. Grotfang is having the same problem now that he got the eatdrink update on the last page of the eatdrink.ash thread. I do have it as EatDrink.ash, and everything is as it should be. It's just a problem with the update of his script...

And also, go on the eatdrink.ash page, and you'll see GrotFang fixed the problem. :)
 

Grotfang

Developer
I should stress, I don't know if that condition was removed for a reason. However, it was still being entered in Ascend.ash, which meant Ascend.ash was giving more to the function than it should have been. It could be that the condition I added to EatDrink.ash should actually have been removed from Ascend.ash.

So, I have made the script pass Ascend.ash through verify. I have not necessarily "fixed" the problem.
 

Spiny

Member
Well to be fair, I ran the newest version of EatDrink.ash in simulation last night on gentoo linux with no problems. However, I don't use Ascend.ash despite having access to it.
 

codster62

Member
Are you sure you were using the latest version? Because for me and grotfang, it did not work. Make sure you got the one on the last page of the thread, and you will be experiencing the same problem we had most likely.
 
Top