on login i get a black screen this is ALL my code
mob
verb
Fireball()
set category = "spells"
icon = 'Spells.dmi'
icon_state = "Fireball"
WaterBeam()
set category = "spells"
icon = 'spells.dmi'
icon_state = "WaterBeam"
Tornado()
set category = "spells"
icon = 'spells.dmi'
icon_state = "Tornado"
BlackRipped()
set category = "spells"
icon = 'person.dmi'
icon_state = "Black Player"
BlackNormal()
set category = "spells"
icon = 'person.dmi'
icon_state = "Black Normal"
Teleport()
set category = "Stuck"
usr.loc = locate(1,1,1)
Login()
var/choose = input("Who do u want to be... male, female, or black.... Black is the most frequently updated icon so you should choose him unless you want to look like a sissy") in list("Male","Female","Black")
if(choose == "Male")
icon = 'person.dmi'
icon_state = "Male Player"
loc = locate(17,21,1)
else if(choose == "Female")
icon = 'person.dmi'
icon_state = "Female Player"
loc = locate(16,21,1)
else if(choose == "Black")
icon = 'person.dmi'
icon_state = "Black Normal"
loc = locate(15,21,1)
var
hp = 30 //declares a new variable called HP, with a value of 30
totalhp = 30
mob
var
colour
size
..()
mob
verb
World(msg as text)
world<<"[usr]: [msg]"
TalkToYourself(msg as text)
usr<<"Im a newb:): NOOOB"
turf
grass //defines a "grass" prototype, which is a kind of turf
icon = 'grass.dmi' // and has an icon namde 'grass.dmi'. In single queotes!
icon_state = "Grass"
density = 0
tree
icon = 'Tree.dmi'
icon_state = "Tree"
density = 1
treeB
icon = 'Tree.dmi'
icon_state = "TreeB"
density = 1
bush
icon = 'Grass.dmi'
icon_state = "Bush"
density = 1
GrassB
icon = 'Grass.dmi'
icon_state = "GrassB"
TreeC
icon = 'Tree.dmi'
icon_state = "TreeC"
density = 1
TreeD
icon = 'Tree.dmi'
icon_state = "TreeD"
density = 1
Tile
icon = 'Indoor.dmi'
icon_state = "Tile"
Brick
icon = 'indoor.dmi'
icon_state = "brick"
density = 1
Square
icon = 'Indoor.dmi'
icon_state = "SquareA"
Brickvert
icon = 'indoor.dmi'
icon_state = "Brick Vert"
density = 1
Speaker
icon = 'random stuff.dmi'
icon_state = "Speaker"
density = 1
Table
icon = 'random stuff.dmi'
icon_state = "Table"
density = 1
Chair1
icon = 'random stuff.dmi'
icon_state = "Chair 1"
chair2
icon = 'random stuff.dmi'
icon_state = "Chair 2"
Tv
icon = 'random stuff.dmi'
icon_state = "Tv"
density = 1
beer
icon = 'random stuff.dmi'
icon_state = "Beer"
jail
icon = 'indoor.dmi'
icon_state = "Jail 1"
density = 1
jail2
icon = 'indoor.dmi'
icon_state = "Jail 2"
density = 1
jail3
icon = 'indoor.dmi'
icon_state = "Jail 3"
density = 1
tile2
icon = 'Indoor.dmi'
icon_state = "Tile2"
bar
icon = 'indoor.dmi'
icon_state = "Bar"
density = 1
bar2
icon = 'indoor.dmi'
icon_state = "Bar2"
density = 1
speaker2
icon = 'random stuff.dmi'
icon_state = "Speaker 2"
density = 1
speaker3
icon = 'random stuff.dmi'
icon_state = "Speaker 3"
density = 1
mob/proc/stab()
world << "You got stabbed by the black."
mob
black
icon = 'person.dmi'
icon_state = "Black"
world
hub = "Red Ribbon Army.StickVsMan"
world
view = 8
mob
New()//when a mob is created
sleep(10)
if(isnull(src.client))//if it's not human
ai_random_wander()//wander
return..()//continue on with normal New() (create and whatnot)
else
return..()
mob
proc//core procs for the system
ai_random_wander()//random wander if no mobs are in range to attack
if(src.key)//if the source is human
return//don't call the rest
else
walk_rand(src,5)//walk randomly with 5 lag
src.ai_walk_to()//checks for run away
spawn(10)//delay for one tick
ai_random_wander()//wander some more
ai_walk_to()
if(src.client)
return 0
else
mob
proc
death()
if(src.hp <=0)
src.loc = locate(1,1,1)
src.hp = src.totalhp
mob/Logout()
world << "[src] Isn't black enough for this game."
var/savefile/F=new(ckey)
Write(F)
del(src)
mob/Login()
world << "[src] now is ready to unleash his inner black!"
var/savefile/F=new(ckey)
Read(F)
mob
verb
attack(mob/M as mob in oview(1))
usr << "You attack [M]!"
oview() << "[usr] attacks [M]!"
var/damage = rand(1,10)
world << "[damage] damage!"
M.hp -= damage
var
hp = 100
def = 2
str = 2
damage = 0
src = 1
ID:272446
Jul 13 2008, 3:44 pm
|
|
In response to Andre-g1
|
|
Let's not forget DM tags =]
Red Ribbon Army, I take it you're a beginner? (I noticed code from the ZBT's). Now that you have the basics down, you should read the DM guide along with the DM reference! |
Login() |
You have my code everything is the same except i changed
Login() var/choose = input(src,"Who do u want to be... male, female, or black.... Black is the most frequently updated icon so you should choose him unless you want to look like a sissy","Please Select") in list("Male","Female","Black") now i get these errors and i have no clue what to do with them plz help =P. loading TestWorld.dme loading background.dmf TestWorld.dm:30:error:list:undefined proc TestWorld.dm:31:error::invalid expression TestWorld.dm:30:choose :warning: variable defined but not used TestWorld.dmb - 2 errors, 1 warning (double-click on an error to jump to it) |
In response to Red Ribbon Army
|
|
Red Ribbon, you have to call the parent procs, for the built in ones, like Login and Logout...
So, just put this on the bottom line of Login and Logout ..() And you SHOULD be fine. |
Anyways, I'll skip to the problem and tell you the solution(to the problem you reported, not to the various ones shown there):
- Call the parent proc ( ..() ) on the built-in procs such as:
--Login()
--Logout()