|
||
|
|||||||
| General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
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- |
|
|
|
#4 (permalink) |
|
Not a lurker
Join Date: Jan 2004
Location: Kentucky
Age: 33
Posts: 1,213
|
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 |
|
|
|
|
|
#7 (permalink) |
|
Master of the Internet
Join Date: Aug 2003
Posts: 5,688
|
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|