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

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Converting ROM snipper to FUSS

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Converting ROM snipper to FUSS
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  3  

Posted by Gatewaysysop2   USA  (142 posts)  [Biography] bio
Date Thu 22 Dec 2005 10:41 AM (UTC)  quote  ]
Message
Meh. Looked like a forum response to me, but what do I know?

At any rate, maybe you can share what the problem was in case others have issues with the same snippet? Seems only fair.


"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
[Go to top] top

Posted by Mopop   (115 posts)  [Biography] bio
Date Wed 21 Dec 2005 07:20 PM (UTC)  quote  ]
Message
Yeah I was replying to Zeno, Its over anways.
[Go to top] top

Posted by Gatewaysysop2   USA  (142 posts)  [Biography] bio
Date Wed 21 Dec 2005 04:33 PM (UTC)  quote  ]
Message
Might be a tad more informative if you would actually explain 'how' it didn't work, not just "heh, didn't work". That doesn't help anyone to solve your problem.

For starters, are you still getting the same error message as before? Can you post the code you are using now and what the current error message associated with it is, line numbers and all?

Maybe with that info people can be of more help?


"The world of men is dreaming, it has gone mad in its sleep, and a snake is strangling it, but it can't wake up." -D.H. Lawrence
[Go to top] top

Posted by Mopop   (115 posts)  [Biography] bio
Date Sat 17 Dec 2005 12:28 AM (UTC)  quote  ]
Message
heh didnt work

     ||( can_use_skill( ch, number_percent( ), gsn_shell ) && IS_OBJ_STAT(gun,GUN_SHELL))
is the line, line 3343
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Sat 17 Dec 2005 12:25 AM (UTC)  quote  ]
Message
Change the line to:
if(( can_use_skill( ch, number_percent( ), gsn_clip ) && IS_OBJ_STAT(gun,GUN_CLIP))

I think.

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

Posted by Mopop   (115 posts)  [Biography] bio
Date Sat 17 Dec 2005 12:24 AM (UTC)  quote  ]
Message
/* Do the character know how to handle a gun ? */
for(number = 0 ; number < shots ; number = number + 1)
{
if( can_use_skill( ch, number_percent( ), gsn_clip ) && IS_OBJ_STAT(gun,GUN_CLIP)
||( can_use_skill( ch, number_percent( ), gsn_energy ) && IS_OBJ_STAT(gun,GUN_ENERGY))
||( can_use_skill( ch, number_percent( ), gsn_shell ) && IS_OBJ_STAT(gun,GUN_SHELL))
||( can_use_skill( ch, number_percent( ), gsn_fuel ) && IS_OBJ_STAT(gun,GUN_FUEL))
||( can_use_skill( ch, number_percent( ), gsn_rocket ) && IS_OBJ_STAT(gun,GUN_ROCKET)))
{

Its this same damn block x_x
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Sat 17 Dec 2005 12:07 AM (UTC)  quote  ]
Message
Can you paste that code block?

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

Posted by Mopop   (115 posts)  [Biography] bio
Date Sat 17 Dec 2005 12:03 AM (UTC)  quote  ]
Message
Well I got the error to go away.

act_obj.c:3343: warning: suggest parentheses around && within ||

Now what the heck does that mean and Ill be happy ;-)
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Fri 16 Dec 2005 11:12 PM (UTC)  quote  ]
Message
It looks to me like it is suppose to set your target to who you're fighting. But that's not what it does.

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

Posted by Mopop   (115 posts)  [Biography] bio
Date Fri 16 Dec 2005 11:10 PM (UTC)  quote  ]
Message
LoL Its the best I could find =( im not even sure why you need to check to see if someone is fighting for that...
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Fri 16 Dec 2005 10:53 PM (UTC)  quote  ]
Message
That makes no sense. From what I've seen, this is a really bad snippet... If they wanted to do a null statement, they could have just used ;

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

Posted by Mopop   (115 posts)  [Biography] bio
Date Fri 16 Dec 2005 10:48 PM (UTC)  quote  ]
Message
obj = NULL;
if ( arg2[0] == '\0' )
{
if ( ch->fighting != NULL )
{
victim->fighting;
}
else
{
send_to_char( "Shoot whom or what?\n\r", ch );
return;
}

Thats the whole code, I dont know why its checking to see if someone is fighting?
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Fri 16 Dec 2005 10:16 PM (UTC)  quote  ]
Message
Better than victim->fighting? What exactly do you intend to be doing..?

If check_improve is the learn_from, make sure you have a check for both success and failure.

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

Posted by Mopop   (115 posts)  [Biography] bio
Date Fri 16 Dec 2005 10:13 PM (UTC)  quote  ]
Message
I assume check_improve is roms version of
learn_from_failure( ch, sn );

also what would be better to use than victim->fighting?
[Go to top] top

Posted by Zeno   USA  (2,868 posts)  [Biography] bio   Moderator
Date Fri 16 Dec 2005 09:51 PM (UTC)  quote  ]
Message
Do you have the function check_improve somewhere in the code?

And yes, victim->fighting does nothing.

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[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.


7,593 views.

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

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]