This is a quest for my rpg.....but it has some errors....and I do't know why!
mob
icon = 'Lord Ghen.dmi'
var
completed_ghens_quest = 0
talked_to_ghen = 0
verb
Talk()
set category = "Actions"
set name = "Talk"
set src in view(1)
if(completed_ghens_quest == 0)
if(talked_to_ghen == 0)
alert("Go to Aisrep and bring back a head of one of the soldiers!")
talked_to_ghen == 1
if(taked_to_ghen == 1)
if(locate(/obj/Head_of_Aisrep_Soldier) in inventory)
alert("Good job, now I will award you with some gold!")
usr.Gold += 5000
else
alert("You still havent brang back a head!?!? Go now! ont come back unitl you have one!")
loading Heaven's Corruption.dme
Quests.dm:8:error:set :invalid proc definition
Quests.dm:9:error:set :invalid proc definition
Quests.dm:10:error:set :invalid proc definition
Quests.dm:11:error::invalid proc definition
Heaven's Corruption.dmb - 4 errors, 0 warnings (double-click on an error to jump to it)
ID:147657
Feb 16 2004, 8:55 am
|
|
Feb 16 2004, 8:56 am
|
|
Indent each of the set lines once.
|
In response to Garthor
|
|
ok...now i have more errors....
mob icon = 'Lord Ghen.dmi' var completed_ghens_quest = 0 talked_to_ghen = 0 verb Talk() set category = "Actions" set name = "Talk" set src in view(1) if(completed_ghens_quest == 0) if(talked_to_ghen == 0) alert("Go to Aisrep and bring back a head of one of the soldiers!") talked_to_ghen == 1 if(talked_to_ghen == 1) if(locate(/obj/Special_Items/Head_of_Aisrep_Soldier) in inventory) alert("Good job, now I will award you with some gold!") usr.Gold += 5000 else alert("You still havent brang back a head!?!? Go now! ont come back unitl you have one!") loading Heaven's Corruption.dme Quests.dm:16:error:inventory:undefined var Quests.dm:14:== :warning: statement has no effect Heaven's Corruption.dmb - 1 error, 1 warning (double-click on an error to jump to it) |
In response to Nave
|
|
I'm assuming it should be usr.inventory, all your "if(whatever == 0)" lines should be "if(!whatever)" (if not whatever), all the "if(whatever == 1)" lines should be "if(whatever)", and the "if(talked_to_ghen == 1)" line should be "else if(etc.)"
|
In response to Garthor
|
|
AAHHHHH All the if's are confusing me!
|
In response to Nave
|
|
Now i just have a warning.
mob icon = 'Lord Ghen.dmi' var completed_ghens_quest = 0 talked_to_ghen = 0 verb Talk() set category = "Actions" set name = "Talk" set src in view(1) if(completed_ghens_quest == 0) if(talked_to_ghen == 0) alert("Go to Aisrep and bring back a head of one of the soldiers!") talked_to_ghen == 1 *** if(talked_to_ghen == 1) if(locate(/obj/Special_Items/Head_of_Aisrep_Soldier) in usr.contents) alert("Good job, now I will award you with some gold!") usr.Gold += 5000 else alert("You still havent brang back a head!?!? Go now! ont come back unitl you have one!") *** = warning loading Heaven's Corruption.dme Quests.dm:14:== :warning: statement has no effect loading World.dmp saving Heaven's Corruption.dmb Heaven's Corruption.dmb - 0 errors, 1 warning (double-click on an error to jump to it) |
In response to Nave
|
|
Nave wrote:
talked_to_ghen == 1 *** Want you want here is the assignment operator. Or in plain english, '='. == is only used for comparing 'objects' together whether they are string, mobs, etc. |
In response to Lazyboy
|
|
Ok that helped alot but now I added in the ending to the quest.....and I have some errors...how do i delete the head from his contents????
mob/Quest/Lord_Ghens_Quest name = "Lord Ghen" icon = 'Lord Ghen.dmi' var completed_ghens_quest = 0 talked_to_ghen = 0 verb Talk() set category = "Actions" set name = "Talk" set src in view(1) if(completed_ghens_quest == 0) if(talked_to_ghen == 0) alert("Go to Aisrep and bring back a head of one of the soldiers!") talked_to_ghen = 1 if(talked_to_ghen == 1) if(locate(/obj/Special_Items/Head_of_Aisrep_Soldier) in usr.contents) alert("Good job, now I will award you with some gold!") usr.Gold += 5000 completed_ghens_quest = 1 del usr.Head_of_Aisrep_Soldier ****** else alert("You still havent brang back a head!?!? Go now! ont come back unitl you have one!") if(completed_ghens_quest == 1) alert("Good job killing that Aisrep sodier!") ******* = error loading Heaven's Corruption.dme Quests.dm:21:error:usr.Head_of_Aisrep_Soldier:undefined var Heaven's Corruption.dmb - 1 error, 0 warnings (double-click on an error to jump to it) |