Go Back   RunUO - Ultima Online Emulation > RunUO > General Discussion

General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT!

Reply
 
Thread Tools Display Modes
Old 03-15-2004, 01:50 PM   #1 (permalink)
 
Join Date: Feb 2003
Posts: 10
Send a message via ICQ to *Keu* Send a message via AIM to *Keu*
Default 2 Question: compiling error & statcap

Hi, i have two question:

1) When i compile a script the RunUo says me " - Warning: Scripts\Engines\Classes\ClassSystem.cs: CS0162: (line 236, column 6)
Unreachable code detected". Is a warning, but someone can explain me what is the trouble?

2) I have implemented a race system on my shard. I want to ask you how i can set a strCap, dexCap and intCap in my system. There is a specific function recall? Or i must do the function manually (how?)?

Thanks very much

bye
*Keu* is offline   Reply With Quote
Old 03-15-2004, 02:05 PM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

1) Its a warning don't worry about it

2) You have to script a "stat" cap for each stat, by default there is no such property.
Phantom is offline   Reply With Quote
Old 03-17-2004, 04:39 PM   #3 (permalink)
 
Join Date: Oct 2003
Posts: 222
Default

Without seeing the code, I can't say exactly what your problem is, but a misplaced return can cause a warning like that.
For example, in this dummy method:
Code:
public static void SomeMethod()
{
     if( varA == varB )
     {
           DoThis();				
     }

     return;  // Misplaced return that would cause a warning

     if( varC == varD )
     {
          DoThat();
     }
     if( varE == varF )
     {
          DoThisAndThat();
     }	
}
this piece of code would be unreachable due to the return right before it
Code:
if( varC == varD )
{
     DoThat();
}
if( varE == varF )
{
     DoThisAndThat();
}
There are warnings for a reason. True, some warning don't really matter. But I wouldn't say, "It's a warning don't worry about it", 'cause in this case, it probably does matter.
Nykovious is offline   Reply With Quote
Old 03-17-2004, 05:03 PM   #4 (permalink)
Forum Expert
 
Join Date: Jan 2004
Posts: 1,377
Default

1) Warning should be taken seriously. However in this case you can just dismiss it, as Phantom said. I suppose you are using TheOutKastDev's Race/Class script?

2) Look here and here. This has already been scripted.
__________________
Dracarys
retired - consider me dead to these boards
Dracarys is offline   Reply With Quote
Old 03-17-2004, 06:09 PM   #5 (permalink)
 
Join Date: Jan 2004
Posts: 753
Send a message via ICQ to Crack177 Send a message via AIM to Crack177 Send a message via Yahoo to Crack177
Default

Also look here. This is 2 pages explaning about errors and if they are important or not. This should answer a lot of people questions.
__________________
Quote:
psz wrote:
You can't block an account because someone doesn't know what they're doing... If the devs did, there'd be, what, 100 accounts instead of ~42000...
Quote:
Phantom wrote:
dieirlthnxbye
The two best quotes I have seen so far on this forum.
My Website
Crack177 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5