[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  Running the server
. . -> [Subject]  If Mud Progs dont work; SCREAM!; endif. =)

If Mud Progs dont work; SCREAM!; endif. =)

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Pages: 1 2  3  

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Wed 04 Jul 2007 11:53 AM (UTC)
Message
Ok, heres one for you brainy bunch to work out...
I've noticed when ever a builder makes a new ifcheck prog such as:

>entry_prog 100
if level($n) > 50 then
   mea $n Welcome to the immy area, $n.
else
   mea $n You shouldn't be here, $n...
   mptran $n 21000
endif

It ends up coming up with a nice strange error...
Log: [*****] BUG: Mptransfer - No such location, Room #1200.
Log: [*****] BUG: Missing endif, Room #1200.

So heres the funny part, any ifchecks which was previously coded into areas such as DH, Battlegrounds etc... if they have ifchecks, their ifchecks work perfectly without bugs. It only happens with newly created if checks.. strange no?

So heres a few things i've tried:
Removing anything i've added to mud_prog.c (It didn't work..)

Downloaded SmaugFUSS 1.7 again, and added mud_prog.c to my SRC... also didn't work.


Any help would be greatful, cheers!

Samryn Medri
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #1 on Wed 04 Jul 2007 11:55 AM (UTC)
Message
What precisely are the symptoms here? Are you saying that if a mudprog that existed before has a bug, e.g. a room it tries to transfer to doesn't exist, it doesn't report the missing endif?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #2 on Wed 04 Jul 2007 12:29 PM (UTC)
Message
Well, as you could see at the prog above... the end if exists in the prog, but the bug reports that the endif doesn't exist. And their for the ifcheck doesn't work all together.

It also seems that it doesn't allow mpcommands to work also, which it reports in the bug below the endif one.

All these bugs only appear when you write the mudprog new, an old existing mudprog works fine. So if i was to be building a new area, i would not be able to create ifchecks.

That clear it up any? =)

Samryn Medri
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #3 on Wed 04 Jul 2007 04:39 PM (UTC)
Message
So if you go to an installed area, take away a prog, and add it again (the exact same) it will no longer work? You've tested that?

Perhaps try removing the formatting (spaces). Strange how it doesn't see the endif.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Meerclar   USA  (733 posts)  [Biography] bio
Date Reply #4 on Wed 04 Jul 2007 06:04 PM (UTC)

Amended on Wed 04 Jul 2007 06:22 PM (UTC) by Meerclar

Message
Well, for starters if you want to check the people entering the room you'd use a greet or greet all program. Enter progs are triggered when the mob itself moves to a new room. Might not be a bad idea to add a sanity check to prevent sending away NPCs that shouldnt be seen by players.

Get back to us if that doesn't work.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #5 on Wed 04 Jul 2007 08:14 PM (UTC)
Message
Zeno- Ok did what you said, i removed an ifcheck, and added the same one back in the same place... and now that has the bug. Im guessing it has something to do with the code? for ones that are not in area file? so the mud isn't understanding that if the area isn't installed it should be still doing the progs, i'll do some more tests and get back to you anyway with the results...

Oh by the sounds of it, the progs do not understand ELSE part of an ifcheck either... so i'll do an installarea and see what happens.

Meerclar - We dont have all_greet as its SmaugFUSS 1.7, i think the smaugfuss team had taken it out and replaced it with greet/entry, but both of them seem to work the same as each other. and sanity check? I'm guessin you mean a NPC check? the prog that i put up was just an example of whats happening... I wouldn't allow such a code to be used in established areas =)

Samryn Medri
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #6 on Wed 04 Jul 2007 09:36 PM (UTC)
Message
Ok, so after installing a new area onto the mud... it's still coming up with the bug. However once i reboot the mud and the area is fully installed, the bug doens't exist...

So my throught of it being only when areas are being built etc was right... is there a section in mud_prog.c which would effect this? or am i lookin in the total wrong area?

Thanks =)

Samryn Medri
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #7 on Wed 04 Jul 2007 10:43 PM (UTC)
Message
No, that just doesn't make any sense. I think I didn't make my question clear enough; I was trying to distinguish the case of mudprogs that have errors seeing the endif and mudprogs that don't have errors that see the endif.

It is possible that if there is a bug in the mudprog, the mudprog driver gets confused and won't correctly parse the rest of the prog.

It is also possible that your client is sending strange characters to the edit buffer, which is confusing the driver somehow. Check the programs in the .are files to see if they look normal.

There's really no reason for an absolutely identical program to work before you touch it but not after, as long as it truly is absolutely identical.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio
Date Reply #8 on Wed 04 Jul 2007 11:07 PM (UTC)
Message
Copy-paste the (working) exact prog from the .are file here. Then after you replace it and it no longer works, copy-paste it here again.

I'll also try this out on the latest FUSS myself.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #9 on Wed 04 Jul 2007 11:09 PM (UTC)
Message
Ah, well me and a few builders have tried to "fix" the problem inside the mud. Using different clients, mine being Zmud, another being MudMagic and one uses Telnet (::twitch::).

The problem seems to be based in when its being created, such as its not fully based into the mud. I have to install an area which is being built, and then reboot the mud before the area progs work... every prog then works perfectly.

If we are editing a currently existing area, it is also the same. The new progs we put into the existing room/mob/objects we still get error messages, we then fold the area and reboot the mud. Once the mud has been rebooted the progs we've added work fine, but before we reboot the progs come up with the "Endif" bug, and "ELSE" doesn't seem to be noticed either.

The progs are error free, apart from the ENDIF bug... and some mpcommands too. I know they are error free because they work perfectly once they have been installed fully and been rebooted.

Hope this makes more sense? Thanks again guys!

Samryn Medri
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #10 on Thu 05 Jul 2007 10:51 PM (UTC)

Amended on Thu 05 Jul 2007 10:53 PM (UTC) by Samryn

Message
This is the one from gods.are, and currently works.

> entry_prog 100~
if level($n) >= 51
   mea $n Welcome to the immortal lounge $n!
else
   mea $n You shouldn't be here!
   mptrans $n 21000
endif
~


I will now delete this prog, and write a similar one its its place:

<32000hp 30000m 108mv> <#1200> rpstat
Name: The Tree of Life.  Vnum: 1200.
>entry_prog 100
if level($n) >= 51
   mea $n Hello $n, please remember to check the board.
else
   mea $n Mortal players shouldn't be here, be gone!
   mptransfer $n 21001
endif


and it still displays the old prog in the .are I will now FOLDAREA to see if it changes the prog in gods.are

Results:

> entry_prog 100~
if level($n) >= 51
   mea $n Hello $n, please remember to check the board.
else
   mea $n Mortal players shouldn't be here, be gone!
   mptransfer $n 21001
endif
~


When i move out of the room, and move back into the room I recieve this:
Hello Samryn, please remember to check the board.
Mortal players shouldn't be here, be gone!
Log: [*****] BUG: Mptransfer - No such location, Room #1200.
Log: [*****] BUG: Missing endif, Room #1200.

So the IFCHECK doesn't seem to be existing either... because its giving me both responses.

Hope this is the information you needed Zeno.
Cheers again.

Samryn Medri
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #11 on Fri 06 Jul 2007 12:08 AM (UTC)
Message
Eh... I think something bigger is going on here. If/else checks are known to work. Are you sure you haven't changed the mudprog code? Do you have a way of determining exactly what you have changed?

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #12 on Fri 06 Jul 2007 01:06 AM (UTC)
Message
I added abits/qbits but i believe this was happening before this... as since then i've resorted back to mud_prog.c which comes straight from the tin.

I went back on SmaugFUSS website and re-downloaed the codebase, and then added the mud_prog.c into the src... so its back to where i started. I tested the SMAUG and it still comes with these errors.

Hmmm, could the problem go even deeper? I had to uncomment apart of the makefile for it to code cleanly on this server.

#Some systems need this for dynamic linking to work.
EXPORT_SYMBOLS = -export-dynamic

Could this cause any of these problems?

Samryn Medri
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio
Date Reply #13 on Fri 06 Jul 2007 01:14 AM (UTC)
Message
It's probably not the dynamic linking. But it is very strange that even basic if/else isn't working for you, because like I said that is a feature known to work for very many people.

Quote:
I went back on SmaugFUSS website and re-downloaed the codebase, and then added the mud_prog.c into the src

I don't understand what exactly you did:

(1) you added your mud_prog.c to a stock SmaugFUSS archive
or
(2) you added SmaugFUSS's copy of mud_prog.c to your code

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by Samryn   United Kingdom  (60 posts)  [Biography] bio
Date Reply #14 on Fri 06 Jul 2007 03:00 PM (UTC)
Message
Number 2. I am using SmaugFUSS 1.7 anyway, so i redownloaed the stock smaugfuss, and added mud_prog.c to my code. I was hoping that would make it work, but without any luck.

Samryn Medri
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


71,881 views.

This is page 1, subject is 3 pages long: 1 2  3  [Next page]

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]