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 07-09-2004, 06:02 AM   #1 (permalink)
Questar
Guest
 
Posts: n/a
Default 2 Errors.

Hello, Im getting these 2 errors in my playermobile.cs and I don't know how to fix it from there. (I was up to 160 errors, now only down to 2 ;p)

================================================== ========



Anyhow here is the error:

Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)


- Error: Scripts\Mobiles\PlayerMobile.cs: CS1040: (line 381, column 29) Preproc
essor directives must appear as the first non-whitespace character on a line


- Error: Scripts\Mobiles\PlayerMobile.cs: CS1040: (line 421, column 29) Preproc
essor directives must appear as the first non-whitespace character on a line
Scripts: One or more scripts failed to compile or no script files were found.


- Press return to exit, or R to try again.



================================================== ========


line 381, column 29 :

name = String.Format( "#{0}", weapon.LabelNumber );






line 421, column 29 :

name = String.Format( "#{0}", armor.LabelNumber );





================================================== ========


Thank you for any help,

Questar-
  Reply With Quote
Old 07-09-2004, 07:12 AM   #2 (permalink)
 
Join Date: Jul 2003
Posts: 34
Default

try escaping the hash chars :

name = String.Format( "\#{0}", weapon.LabelNumber );
Slayeh is offline   Reply With Quote
Old 07-09-2004, 10:32 AM   #3 (permalink)
Questar
Guest
 
Posts: n/a
Default

Didn't Work. Know anything else that might be able to make this pvp point system work?
  Reply With Quote
Old 07-09-2004, 10:34 AM   #4 (permalink)
Not a lurker
 
cward's Avatar
 
Join Date: Jan 2004
Location: Kentucky
Age: 33
Posts: 1,213
Default

You could always post in the correct forum for better support. o.0
__________________
Ilshenar ChampionSpawn Generator
OSI Clone World Spawn files for MegaSpawner.
Current spawn files available:
Malas
Ilshenar
cward is offline   Reply With Quote
Old 07-09-2004, 11:56 AM   #5 (permalink)
Master of the Internet
 
DontdroptheSOAD's Avatar
 
Join Date: Apr 2003
Location: Glen Saint Mary, Florida
Age: 19
Posts: 6,834
Send a message via AIM to DontdroptheSOAD
Default

hehehehehe
DontdroptheSOAD is offline   Reply With Quote
Old 07-09-2004, 02:09 PM   #6 (permalink)
 
Join Date: Jul 2003
Posts: 34
Default

The problem is it doesn't like the # character in the string - so you either need to escape the # (i thought it should have been \#) or change the # to something else.
Slayeh is offline   Reply With Quote
Old 07-09-2004, 03:35 PM   #7 (permalink)
Master of the Internet
 
Join Date: Aug 2003
Posts: 5,688
Default

name = String.Format( "#{0}", weapon.LabelNumber );

the problem is not with including #'s in strings, that is perfectly fine. The problem is probably that you have included the line exactly as it appears above, using html escape sequences for actual quotes.
The presence of the ;# causes it to see that as a separate line. i.e. the preprocessor sees this as 3 lines:

name = String.Format( "
#{0}"
,weapon.LabelNumber );

and complains about what would be the second line that looks like a preprocessor directive.

I'm guessing that you are using some type of html editor for writing your scripts. Use an actual text editor, or preferably a code editor.

this line is perfectly fine

name = String.Format( "#{0}", weapon.LabelNumber );
__________________
The first line of the first rule in the forum rules and guidelines "Be respectful of others. "

For questions, information, and support for XmlSpawner and its addons, visit the
XmlSpawner Support Forum
ArteGordon 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