ExX
Member
I made a REALLY simple command that I based off a simple vote command script I found on RunUO. I just want you to say [maze and it open a specific webpage. I tried referencing other browser commands I could find and I can't figure out what I am doing wrong. I though maybe I needed to add using.Server.Network; but that didnt work either. I'm not sure if the code is wrong or I am missing a reference I can't think of. Any help?
This is the error.
Code:
using System;
using System.Collections.Generic;
using Server.Commands;
using Server.Mobiles;
using Server;
namespace Server.Scripts.Commands
{
public class MazeCommand
{
public static void Initialize()
{
CommandSystem.Register("Maze", AccessLevel.Player, new CommandEventHandler(Maze_OnCommand));
}
[Usage( "Maze" )]
[Description( "Brings up a webpage with tips for the Maze." )]
public static void Maze_OnCommand( CommandEventArgs arg )
{
PlayerMobile m = arg.Mobile as PlayerMobile;
m.Mobile.LaunchBrowser( "http://mysticalnights.org/forums/topic/maze-tips/" );
m.SendMessage( "Launching web browser... One moment..." );
}
}
}
This is the error.
Code:
Errors:
+ Custom/Commands/Maze.cs:
CS1061: Line 23: 'Server.Mobiles.PlayerMobile' does not contain a definition
for 'Mobile' and no extension method 'Mobile' accepting a first argument of typ
e 'Server.Mobiles.PlayerMobile' could be found (are you missing a using directiv
e or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.