ID:1332852
 
(See the best response by D4RK3Z3R0.)
I've been trying for HOURS but nothing worked out. I'm attempting to make 3 specific factions for my game, and they will each have leaders,funds,and members. Problem is, when I add something to one faction and try to do the same to the other, it fails to work. Mainly DM grabs normal pieces of coding from other files that have nothing to do with the faction's coding, and makes up random errors that are only fixed by removing the faction code. What can I do to stop this?
We can't do anything if you don't show us the coding........
I don't know if this changes anything, but i set it up so that the player's faction is determined at Login
mob/Login()
switch(input("What faction?") in list ("faction 1"))//etc...
if("faction 1")
usr.faction1=1//as in positive/on
var/faction1
faction1
var
list/faction1
funds=0
proc
Leader()
FactionMessage()
Demand()
AddFunds()
faction1
AddFunds(n,m,c)


mob
faction1
verb
Donate(n as num)
if(usr.credit<=n)
usr<<"You don't have that much to add!"
return
else
src.funds+=n
usr.credit-=n
FactionMessage("[usr] donated [n]")
mob/Login()
switch(input(src, "What faction?", "Selecting Fractions") in list ("faction 1","faction 2", "faction 3"))//etc...
if("faction 1")
usr.faction=1//as in positive/on


Instead of faction1 = 1 why don't you do faction = 1, faction = 2, and faction = 3.
Even if i add people to the list (faction) they can't access the verbs or participate in funding activity.
That's pretty much what i did, but i suspect somethings wrong with the factions(lists) themselves , & "fractions" was a typo, i meant to write "factions" in that example.
Best response
My mistake
src.verbs+=typesof(/mob/faction1/verb/)
I see.. give me a moment to try that
mob/
proc()
if(usr.faction1==1)
usr.verbs+=typesof(/mob/faction1/verb)

mob/var/faction1
mob/faction1
verb
lala()
I tried doing this and it claimed : :error: /mob/faction1/verb: undefined type path
Oh my bad! i forgot to tab the "verb" part... everything seems to work fine now! thanks alot D4RK3Z3R0 =)
In response to J-Zed
J-Zed wrote:
mob/
> proc()
> if(usr.faction1==1)
> usr.verbs+=typesof(/mob/faction1/verb)
>
> mob/var/faction1
> mob/faction1
> verb
> lala()
I tried doing this and it claimed : >:error: /mob/faction1/verb: undefined type path

Okay.
First of all, why is it mob/proc i said put it under the login

Second of all, the verb is wrongly indented.

Also 3rd of all did you for got a / next to verb

usr.verbs+=typesof(/mob/faction1/verb/) //<--- you see that slash?
Wait...the verbs didn't show up. I got happy since DM didn't say anything.
In response to J-Zed
J-Zed wrote:
Wait...the verbs didn't show up. I got happy since DM didn't say anything.

Oh Gosh

mob/Login()
switch(input("What faction?") in list ("faction 1"))//etc...
if("faction 1")
src.faction1=1//as in positive/on
src.verbs+=typesof(/mob/faction1/verb/)
The verbs worked, but the problem is, i can't have both a var(number , as in faction = 1) the same time as a list.
mob
faction1
verb
Donate(n as num)
if(usr.credit<=n)
usr<<"You don't have that much to add!"
return
else
src.funds+=n
usr.credit-=n
FactionMessage("[usr] donated [n]")

else doesn't do anything.
Nevermind, i think i can guarentee it got fixed this time...the list has a different name and everything seems to be clear . Thanks again D4RK3Z3R0 =)
In response to D4RK3Z3R0
D4RK3Z3R0 wrote:
> mob
> faction1
> verb
> Donate(n as num)
> if(usr.credit<=n)
> usr<<"You don't have that much to add!"
> return
> else
> src.funds+=n
> usr.credit-=n
> FactionMessage("[usr] donated [n]")
>

else doesn't do anything.

mob
faction1
verb
Donate(n as num)
if(usr.credit<=n)
else
src.funds+=n
usr.credit-=n
FactionMessage("[usr] donated [n]")
usr<<"You don't have that much to add!"
return
In response to Wissam
Wissam wrote:
D4RK3Z3R0 wrote:
> > mob
> > faction1
> > verb
> > Donate(n as num)
> > if(usr.credit<=n)
> > usr<<"You don't have that much to add!"
> > return
> > else
> > src.funds+=n
> > usr.credit-=n
> > FactionMessage("[usr] donated [n]")
> >

else doesn't do anything.

> mob
> faction1
> verb
> Donate(n as num)
> if(usr.credit<=n)
> else
> src.funds+=n
> usr.credit-=n
> FactionMessage("[usr] donated [n]")
> usr<<"You don't have that much to add!"
> return
>


You did it wrong.

The message and the return under the faction message is suppose to be under the if.
Your indentation mislead me.
Page: 1 2 3