Difference between revisions of "Talk:SlashTHEM"

From NetHackWiki
Jump to navigation Jump to search
Line 21: Line 21:
 
                     case AT_MAGC: return "uses magic spell(s)";
 
                     case AT_MAGC: return "uses magic spell(s)";
 
::::<span style="background:green;border-radius:15px 0 0 8px">[[user:Elronnd|Elronnd]]</span><span style="background: orange;border-radius:0 8px 15px 0">[[user_talk:Elronnd|(talk)]]</span> 18:54, 21 April 2015 (UTC)
 
::::<span style="background:green;border-radius:15px 0 0 8px">[[user:Elronnd|Elronnd]]</span><span style="background: orange;border-radius:0 8px 15px 0">[[user_talk:Elronnd|(talk)]]</span> 18:54, 21 April 2015 (UTC)
 +
 +
:::::Keep in mind i don't now that much about programming. I think the actual error is in the definition of ./include/monattk.h .One of the values is (-1), i think it instead warps around as the maximum value. In ./include/monattk.h , give "(-1)" to the variable AT_MAGC (the same value as AT_ANY). Try to compile, if it complains again "duplicate case value '255'". Then this is it.
 +
:::::Hmmm, try removing the "()" around the -1 in the include, or try "-(1)" (both compiled over here). If you comment out line 1246 of pager.c ,i think it will only brake Pokedex a bit. They are probably other errors related to this one, that weren't detected by the compiler....--[[User:Quantum Immortal|Quantum Immortal]] ([[User talk:Quantum Immortal|talk]]) 23:22, 21 April 2015 (UTC)

Revision as of 23:22, 21 April 2015

Problems compiling?

I'm running FreeBSD 10.1 prerelease and I got the following

apply.c:4111:4: error: non-void function 'doapply' should return a value

               [-Wreturn-type]

                        return;

Any help? Elronnd(talk) 21:35, 18 April 2015 (UTC)

I can't really help...
Hmmm, try "return 0;" ??? in ./src/apply.c line 4111.
It seams FreeBSD is using "LLVM/Clang" now instead of gcc. You'll likely get more errors. You could try using a different compiler? On linux it works with gcc version 4.8.2. You could also try with "make -i", it will ignore all errors.--Quantum Immortal (talk) 00:38, 19 April 2015 (UTC)
I tried switching to gcc, and that didn't help. Return 0 didn't work either. Make -i compiled everything except for the slashthem executable... Elronnd(talk) 20:50, 19 April 2015 (UTC)
Are you sure you didn't forgot to save when you put that 0? It compiled fine here. What was the error this time? try with "1" too (it compiles with that too here). Try with different versions of gcc... probably close to 4.8.2 or the oldest one of the ones available. You should stick with gcc however, they will be less errors. You really used gcc? You have to edit ./src/Makefile. By setting the variable CC you'll force it to use a specific compiler (you can have several versions of gcc installed). Line 59 and bellow they are some stuff you could try. Just comment out "return;" for now( compiles here), see if they are more errors. By commenting out, try to find all the errors. Ask Amy( try also with slashem extended) and the guys of slashthem.--Quantum Immortal (talk) 23:37, 19 April 2015 (UTC)
Actually just realized that it did fix it: there were just more of them. However, now I've got a completely different problem (the only error left):
   pager.c:1246:8: error: duplicate case value '255'
                   case AT_MAGC: return "uses magic spell(s)";
Elronnd(talk) 18:54, 21 April 2015 (UTC)
Keep in mind i don't now that much about programming. I think the actual error is in the definition of ./include/monattk.h .One of the values is (-1), i think it instead warps around as the maximum value. In ./include/monattk.h , give "(-1)" to the variable AT_MAGC (the same value as AT_ANY). Try to compile, if it complains again "duplicate case value '255'". Then this is it.
Hmmm, try removing the "()" around the -1 in the include, or try "-(1)" (both compiled over here). If you comment out line 1246 of pager.c ,i think it will only brake Pokedex a bit. They are probably other errors related to this one, that weren't detected by the compiler....--Quantum Immortal (talk) 23:22, 21 April 2015 (UTC)