ID:150568
 
Still having problems with my ctf code, for one the area is dense and wont let my player go through to even capture the opposing teams flag. Also when I just go up and touch my own teams flag it shows this..

cannot remove from list
proc name: Enter (/area/bctf/Enter)
source file: flags.dm,47
usr: GM-Oblivian (/mob/GM)
src: the bctf (/area/bctf)
call stack:
the bctf (/area/bctf): Enter(GM-Oblivian (/mob/GM))
GM-Oblivian (/mob/GM): Move(the concrete (147,194,0) (/turf/concrete), 8)


Whenever I touch the opposing teams flag I get this..

"You have no flag to return."

Here is my code for the area..

var/team

area/bctf
Enter()
if(team == "Blue")
var/tmp/b_flag = /obj/b_flag
for(b_flag in src.contents)
src.contents -= /obj/b_flag
usr.pk += 5
else
usr << "You have no flag to return."
area/rctf
Enter()
if(team == "Red")
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= /obj/r_flag
usr.pk += 5
else
usr << "You have no flag to return."
I tried adding a player to whatever team they choose with team.

My login code is this,

if("Blue")
icon = 'ctfblue.dmi'
src.loc = locate(/area/blue)
team = "Blue"
if("Red")
icon = 'ctfred.dmi'
src.loc = locate(/area/red)
team = "Red"

Sorry about all of this, thanx for any help.
Oblivian wrote:
Still having problems with my ctf code, for one the area is dense and wont let my player go through to even capture the opposing teams flag. Also when I just go up and touch my own teams flag it shows this..

cannot remove from list
proc name: Enter (/area/bctf/Enter)
source file: flags.dm,47
usr: GM-Oblivian (/mob/GM)
src: the bctf (/area/bctf)
call stack:
the bctf (/area/bctf): Enter(GM-Oblivian (/mob/GM))
GM-Oblivian (/mob/GM): Move(the concrete (147,194,0) (/turf/concrete), 8)


Whenever I touch the opposing teams flag I get this..

"You have no flag to return."

Here is my code for the area..

var/team

area/bctf
Enter()
if(team == "Blue")
var/tmp/b_flag = /obj/b_flag
for(b_flag in src.contents)
src.contents -= /obj/b_flag
usr.pk += 5
else
usr << "You have no flag to return."
area/rctf
Enter()
if(team == "Red")
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= /obj/r_flag
usr.pk += 5
else
usr << "You have no flag to return."
I tried adding a player to whatever team they choose with team.

My login code is this,

if("Blue")
icon = 'ctfblue.dmi'
src.loc = locate(/area/blue)
team = "Blue"
if("Red")
icon = 'ctfred.dmi'
src.loc = locate(/area/red)
team = "Red"

Sorry about all of this, thanx for any help.

Your login code doesn't do what you think it's doing, unless this is all nested under some switch statement that you forgot to include. if("Blue") is always true, as is if("Red"). If you don't understand why, check out the document linked here: [link]

Also, declaring team as a global var doesn't seem like what you want. Is everybody going to be on the same team?

/mob/skysaw

Oblivian wrote:
Still having problems with my ctf code, for one the area is dense and wont let my player go through to even capture the opposing teams flag. Also when I just go up and touch my own teams flag it shows this..

cannot remove from list
proc name: Enter (/area/bctf/Enter)
source file: flags.dm,47
usr: GM-Oblivian (/mob/GM)
src: the bctf (/area/bctf)
call stack:
the bctf (/area/bctf): Enter(GM-Oblivian (/mob/GM))
GM-Oblivian (/mob/GM): Move(the concrete (147,194,0) (/turf/concrete), 8)


Whenever I touch the opposing teams flag I get this..

"You have no flag to return."

Here is my code for the area..

var/team

area/bctf
Enter()
if(team == "Blue")
var/tmp/b_flag = /obj/b_flag
for(b_flag in src.contents)
src.contents -= /obj/b_flag
usr.pk += 5
else
usr << "You have no flag to return."
area/rctf
Enter()
if(team == "Red")
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= /obj/r_flag
usr.pk += 5
else
usr << "You have no flag to return."
I tried adding a player to whatever team they choose with team.

My login code is this,

if("Blue")
icon = 'ctfblue.dmi'
src.loc = locate(/area/blue)
team = "Blue"
if("Red")
icon = 'ctfred.dmi'
src.loc = locate(/area/red)
team = "Red"

Sorry about all of this, thanx for any help.


its the if(team = "Blue" and "Red") thats failing, try doing src.team, how is team defined? under what is it defined?

Alathon
In response to Alathon
its the if(team = "Blue" and "Red") thats failing, try doing src.team, how is team defined? under what is it defined?

Alathon

What do u mean how is team defined? I put var/team.. if thats what you mean.

src.team gives me a bad var error
same with usr.team..
paintball.dm:43:error:src.team:bad var
paintball.dm:47:error:src.team:bad var
In response to Skysaw
Skysaw wrote:
Oblivian wrote:
Still having problems with my ctf code, for one the area is dense and wont let my player go through to even capture the opposing teams flag. Also when I just go up and touch my own teams flag it shows this..

cannot remove from list
proc name: Enter (/area/bctf/Enter)
source file: flags.dm,47
usr: GM-Oblivian (/mob/GM)
src: the bctf (/area/bctf)
call stack:
the bctf (/area/bctf): Enter(GM-Oblivian (/mob/GM))
GM-Oblivian (/mob/GM): Move(the concrete (147,194,0) (/turf/concrete), 8)


Whenever I touch the opposing teams flag I get this..

"You have no flag to return."

Here is my code for the area..

var/team

area/bctf
Enter()
if(team == "Blue")
var/tmp/b_flag = /obj/b_flag
for(b_flag in src.contents)
src.contents -= /obj/b_flag
usr.pk += 5
else
usr << "You have no flag to return."
area/rctf
Enter()
if(team == "Red")
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= /obj/r_flag
usr.pk += 5
else
usr << "You have no flag to return."
I tried adding a player to whatever team they choose with team.

My login code is this,

if("Blue")
icon = 'ctfblue.dmi'
src.loc = locate(/area/blue)
team = "Blue"
if("Red")
icon = 'ctfred.dmi'
src.loc = locate(/area/red)
team = "Red"

Sorry about all of this, thanx for any help.

Your login code doesn't do what you think it's doing, unless this is all nested under some switch statement that you forgot to include. if("Blue") is always true, as is if("Red"). If you don't understand why, check out the document linked here: [link]

Also, declaring team as a global proc doesn't seem like what you want. Is everybody going to be on the same team?

/mob/skysaw

No I didnt put in the rest of the login code, because there is like 30 lines of it :). Asking various things etc, Do I need to make a list here? So when a player logs in it will add him to the appropiate list(blue, or red). Then with the area/ctflag or whatever load the list? I don't get lists at all.
In response to Oblivian
Oblivian wrote:
Skysaw wrote:
Oblivian wrote:
Still having problems with my ctf code, for one the area is dense and wont let my player go through to even capture the opposing teams flag. Also when I just go up and touch my own teams flag it shows this..

cannot remove from list
proc name: Enter (/area/bctf/Enter)
source file: flags.dm,47
usr: GM-Oblivian (/mob/GM)
src: the bctf (/area/bctf)
call stack:
the bctf (/area/bctf): Enter(GM-Oblivian (/mob/GM))
GM-Oblivian (/mob/GM): Move(the concrete (147,194,0) (/turf/concrete), 8)


Whenever I touch the opposing teams flag I get this..

"You have no flag to return."

Here is my code for the area..

var/team

area/bctf
Enter()
if(team == "Blue")
var/tmp/b_flag = /obj/b_flag
for(b_flag in src.contents)
src.contents -= /obj/b_flag
usr.pk += 5
else
usr << "You have no flag to return."
area/rctf
Enter()
if(team == "Red")
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= /obj/r_flag
usr.pk += 5
else
usr << "You have no flag to return."
I tried adding a player to whatever team they choose with team.

My login code is this,

if("Blue")
icon = 'ctfblue.dmi'
src.loc = locate(/area/blue)
team = "Blue"
if("Red")
icon = 'ctfred.dmi'
src.loc = locate(/area/red)
team = "Red"

Sorry about all of this, thanx for any help.

Your login code doesn't do what you think it's doing, unless this is all nested under some switch statement that you forgot to include. if("Blue") is always true, as is if("Red"). If you don't understand why, check out the document linked here: [link]

Also, declaring team as a global proc doesn't seem like what you want. Is everybody going to be on the same team?

/mob/skysaw

No I didnt put in the rest of the login code, because there is like 30 lines of it :). Asking various things etc, Do I need to make a list here? So when a player logs in it will add him to the appropiate list(blue, or red). Then with the area/ctflag or whatever load the list? I don't get lists at all.

My point was that you have

var/team

Which is a single variable. You need a variable for each mob, so that they can each be on a different team.

mob/var/team

In response to Skysaw
Skysaw wrote:
Oblivian wrote:
Skysaw wrote:
Oblivian wrote:
Still having problems with my ctf code, for one the area is dense and wont let my player go through to even capture the opposing teams flag. Also when I just go up and touch my own teams flag it shows this..

cannot remove from list
proc name: Enter (/area/bctf/Enter)
source file: flags.dm,47
usr: GM-Oblivian (/mob/GM)
src: the bctf (/area/bctf)
call stack:
the bctf (/area/bctf): Enter(GM-Oblivian (/mob/GM))
GM-Oblivian (/mob/GM): Move(the concrete (147,194,0) (/turf/concrete), 8)


Whenever I touch the opposing teams flag I get this..

"You have no flag to return."

Here is my code for the area..

var/team

area/bctf
Enter()
if(team == "Blue")
var/tmp/b_flag = /obj/b_flag
for(b_flag in src.contents)
src.contents -= /obj/b_flag
usr.pk += 5
else
usr << "You have no flag to return."
area/rctf
Enter()
if(team == "Red")
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= /obj/r_flag
usr.pk += 5
else
usr << "You have no flag to return."
I tried adding a player to whatever team they choose with team.

My login code is this,

if("Blue")
icon = 'ctfblue.dmi'
src.loc = locate(/area/blue)
team = "Blue"
if("Red")
icon = 'ctfred.dmi'
src.loc = locate(/area/red)
team = "Red"

Sorry about all of this, thanx for any help.

Your login code doesn't do what you think it's doing, unless this is all nested under some switch statement that you forgot to include. if("Blue") is always true, as is if("Red"). If you don't understand why, check out the document linked here: [link]

Also, declaring team as a global proc doesn't seem like what you want. Is everybody going to be on the same team?

/mob/skysaw

No I didnt put in the rest of the login code, because there is like 30 lines of it :). Asking various things etc, Do I need to make a list here? So when a player logs in it will add him to the appropiate list(blue, or red). Then with the area/ctflag or whatever load the list? I don't get lists at all.

My point was that you have

var/team

Which is a single variable. You need a variable for each mob, so that they can each be on a different team.

mob/var/team

When I added this in, it shows:

flags.dm:44:error:team:bad var
flags.dm:53:error:team:bad var
In response to Oblivian
NM, it's suppose to be var/mob/team.
Still doesn't work :( why is this so hard.. all I want is to be able to capture the flag, and return it to my base.
In response to Oblivian
area/rctf
Enter()
if(icon == 'ctfred.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'rcrawl.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'ctfblue.dmi')
set src in oview(1)
usr << "You have taken the [src]!"
world << "[usr] has taken the flag!"
Move(usr)
else
usr << "You have no flags to return."


Gives this error:

flags.dm:74:error:Move:bad proc


In response to Oblivian
Oblivian wrote:
area/rctf
Enter()
if(icon == 'ctfred.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'rcrawl.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'ctfblue.dmi')
set src in oview(1)
usr << "You have taken the [src]!"
world << "[usr] has taken the flag!"
Move(usr)
else
usr << "You have no flags to return."


Gives this error:

flags.dm:74:error:Move:bad proc


You are trying to move the area into the user. What you probably want is:

<code>else if(icon == 'ctfblue.dmi') usr << "You have taken the [r_flag]!" world << "[usr] has taken the flag!" r_flag.Move(usr)</code>

Note that "set src in oview(1)" means nothing in this context. That is used for verb accessibility, and this is not a verb definition.
In response to Skysaw
Skysaw wrote:
Oblivian wrote:
area/rctf
Enter()
if(icon == 'ctfred.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'rcrawl.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'ctfblue.dmi')
set src in oview(1)
usr << "You have taken the [src]!"
world << "[usr] has taken the flag!"
Move(usr)
else
usr << "You have no flags to return."


Gives this error:

flags.dm:74:error:Move:bad proc


You are trying to move the area into the user. What you probably want is:

<code>else if(icon == 'ctfblue.dmi') > usr << "You have taken the [r_flag]!" > world << "[usr] has taken the flag!" > r_flag.Move(usr)</code>

I did this, but instead of Move being the bad proc it is now, flags.dm:74:error:r_flag.Move:bad proc.

Note that "set src in oview(1)" means nothing in this context. That is used for verb accessibility, and this is not a verb definition.
Oops, I did have a get() verb here, just forgot to remove it :)

Everyone thanx for the help you have given me so far, just figured I should say that because I have been trying to figure this out for 3 days now and keep bugging you all :)
In response to Oblivian
Oblivian wrote:
Skysaw wrote:
Oblivian wrote:
area/rctf
Enter()
if(icon == 'ctfred.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'rcrawl.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'ctfblue.dmi')
set src in oview(1)
usr << "You have taken the [src]!"
world << "[usr] has taken the flag!"
Move(usr)
else
usr << "You have no flags to return."


Gives this error:

flags.dm:74:error:Move:bad proc


You are trying to move the area into the user. What you probably want is:

<code>else if(icon == 'ctfblue.dmi') > > usr << "You have taken the [r_flag]!" > > world << "[usr] has taken the flag!" > > r_flag.Move(usr)</code>

I did this, but instead of Move being the bad proc it is now, flags.dm:74:error:r_flag.Move:bad proc.

Note that "set src in oview(1)" means nothing in this context. That is used for verb accessibility, and this is not a verb definition.
Oops, I did have a get() verb here, just forgot to remove it :)

Everyone thanx for the help you have given me so far, just figured I should say that because I have been trying to figure this out for 3 days now and keep bugging you all :)

Not sure if you didnt post that you found out how, but, its NOT var/mob/team, its mob/var/team if u want to declare a variable called team for al mobs, var/mob/team defines the global variable mob,and under that a mob called "team", which is not what you want I take it.

Alathon
In response to Alathon
Alathon wrote:
Oblivian wrote:
Skysaw wrote:
Oblivian wrote:
area/rctf
Enter()
if(icon == 'ctfred.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'rcrawl.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'ctfblue.dmi')
set src in oview(1)
usr << "You have taken the [src]!"
world << "[usr] has taken the flag!"
Move(usr)
else
usr << "You have no flags to return."


Gives this error:

flags.dm:74:error:Move:bad proc


You are trying to move the area into the user. What you probably want is:

<code>else if(icon == 'ctfblue.dmi') > > > usr << "You have taken the [r_flag]!" > > > world << "[usr] has taken the flag!" > > > r_flag.Move(usr)</code>

I did this, but instead of Move being the bad proc it is now, flags.dm:74:error:r_flag.Move:bad proc.

Note that "set src in oview(1)" means nothing in this context. That is used for verb accessibility, and this is not a verb definition.
Oops, I did have a get() verb here, just forgot to remove it :)

Everyone thanx for the help you have given me so far, just figured I should say that because I have been trying to figure this out for 3 days now and keep bugging you all :)

Not sure if you didnt post that you found out how, but, its NOT var/mob/team, its mob/var/team if u want to declare a variable called team for al mobs, var/mob/team defines the global variable mob,and under that a mob called "team", which is not what you want I take it.

Alathon

I saw var/mob/team in a demo, not sure which one I forgot now.

Someone help me with the bad proc problem, please?
In response to Oblivian
Oblivian wrote:
Alathon wrote:
Oblivian wrote:
Skysaw wrote:
Oblivian wrote:
area/rctf
Enter()
if(icon == 'ctfred.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'rcrawl.dmi')
var/tmp/r_flag = /obj/r_flag
for(r_flag in src.contents)
src.contents -= r_flag
usr.pk += 5
usr.cash += 50
else if(icon == 'ctfblue.dmi')
set src in oview(1)
usr << "You have taken the [src]!"
world << "[usr] has taken the flag!"
Move(usr)
else
usr << "You have no flags to return."


Gives this error:

flags.dm:74:error:Move:bad proc


You are trying to move the area into the user. What you probably want is:

<code>else if(icon == 'ctfblue.dmi') > > > > usr << "You have taken the [r_flag]!" > > > > world << "[usr] has taken the flag!" > > > > r_flag.Move(usr)</code>

I did this, but instead of Move being the bad proc it is now, flags.dm:74:error:r_flag.Move:bad proc.

Note that "set src in oview(1)" means nothing in this context. That is used for verb accessibility, and this is not a verb definition.
Oops, I did have a get() verb here, just forgot to remove it :)

Everyone thanx for the help you have given me so far, just figured I should say that because I have been trying to figure this out for 3 days now and keep bugging you all :)

Not sure if you didnt post that you found out how, but, its NOT var/mob/team, its mob/var/team if u want to declare a variable called team for al mobs, var/mob/team defines the global variable mob,and under that a mob called "team", which is not what you want I take it.

Alathon

I saw var/mob/team in a demo, not sure which one I forgot now.

Someone help me with the bad proc problem, please?


And ive seen a weapon and armor system in firekings lib, does that mean thats what I should use? No. Im not sure if im understanding what your saying wrong, or your understanding me wrong. Do you want, team, to be a GLOBAL var (ie, its not specific to players, each player cant have a team var), or do you want team to be a var on each player, so you can change it for each player?

Because var/mob/team defines a global var, called mob, and under that, team

mob/var/team defines a variable for everything under /mob/ (every mob), called team, so every person has a team.

Alathon