In response to Pharaoh Atem
                var/mob/W = locate(/mob in oview(3))
var/mob/Y = locate(/mob in oview(2))
var/mob/Z = locate(/mob in oview(1))


That is incorrect. What you did was creating a var and you gave it an invalid location.

A valid way of doing this would be:
for(var/mob/M in oview(3))
if(!M)
usr<<"Error: There isn't a mob in your sight!"
return
var/mob/W = new (/mob/W(locate(M.x,M.y,M.z))
var/mob/Y = new (/mob/W(locate(M.x,M.y,M.z))
var/mob/Z = new (/mob/W(locate(M.x,M.y,M.z))


O-matic
In response to O-matic
> for(var/mob/M in oview(3))
> if(!M)
> usr<<"Error: There isn't a mob in your sight!"
> return
> var/mob/W = new (/mob/W(locate(M.x,M.y,M.z))
> var/mob/Y = new (/mob/W(locate(M.x,M.y,M.z))
> var/mob/Z = new (/mob/W(locate(M.x,M.y,M.z))
>


i used this:

        Summon_Bass()
set category = "Fight"
var/mob/M = usr
if(M.Custom >= 50)
var/temp = M.icon // hold the icon in a variable
var/mob/E = locate(/mob in oview(3))
M.icon = 'bass_summ.dmi'
spawn(15)
view(5)<< "<font color = brown><BIG>[M] : Multi Gun!!!! </BIG></font>"
for(var/mob/M in oview(3))
if(!M)
usr<<"Error: There isn't a mob in your sight!"
return
var/mob/W = new (/mob/W(locate(M.x,M.y,M.z)))
var/mob/Y = new (/mob/W(locate(M.x,M.y,M.z)))
var/mob/Z = new (/mob/W(locate(M.x,M.y,M.z)))
E.overlay += bshot
sleep(1)
E.HP -= 220
sleep(3)
E.overlay += bshot
sleep(1)
M.icon = temp // revert the icon back
E.overlay -= bshot
else
M << "You Dont Have Enough Custom!"


compiling errors:

loading simple.dme
SkillGain.dm:615:error:M :duplicate definition
SkillGain.dm:608:error:M :previous definition
SkillGain.dm:619:error:/mob/W:undefined type path
SkillGain.dm:620:error:/mob/W:undefined type path
SkillGain.dm:621:error:/mob/W:undefined type path
SkillGain.dm:622:error:E.overlay:undefined var
SkillGain.dm:622:error:bshot:undefined var
SkillGain.dm:626:error:E.overlay:undefined var
SkillGain.dm:626:error:bshot:undefined var
SkillGain.dm:629:error:E.overlay:undefined var
SkillGain.dm:629:error:bshot:undefined var
SkillGain.dm:616:if :warning: if statement has no effect
SkillGain.dm:619:W :warning: variable defined but not used
SkillGain.dm:620:Y :warning: variable defined but not used
SkillGain.dm:621:Z :warning: variable defined but not used

simple.dmb - 11 errors, 4 warnings (double-click on an error to jump to it)

I CANT UNDERSTAND THESE CODES AND THE GUIDE!PLEASE SEND ME A FULL-CODE VERB!


*EDIT*

I triyed with this

        Summon_Bass(mob/M in oview(2))
if(usr.Custom >= 200)
for(var/mob/M in oview(3))
if(!M)
usr<<"Error: There isn't a mob in your sight!"
return
var/mob/W = new (/mob/W(locate(M.x,M.y,M.z)))
var/mob/Y = new (/mob/W(locate(M.x,M.y,M.z)))
var/mob/Z = new (/mob/W(locate(M.x,M.y,M.z)))
var/bshot = 'bshot.dmi'
set category = "Fight"
var/temp = usr.icon // hold the icon in a variable
usr.icon = 'bass_summ.dmi'
spawn(15)
view(5)<<"<font color = brown><BIG>[usr] : Multi Gun!!!! </BIG></font>"
M.overlays += bshot
W.overlays += bshot
Y.overlays += bshot
Z.overlays += bshot
M.HP -= 220
W.HP -= 220
Y.HP -= 220
Z.HP -= 220
M.overlays -= bshot
W.overlays -= bshot
Y.overlays -= bshot
Z.overlays -= bshot
spawn(5)
usr.icon = temp // revert the icon back
usr.Custom -= 200
else
usr << "You Dont Have Enough Custom!"


and showed this errors:

loading simple.dme
SkillGain.dm:608:error:M :duplicate definition
SkillGain.dm:606:error:M :previous definition
SkillGain.dm:612:error:/mob/W:undefined type path
SkillGain.dm:613:error:/mob/W:undefined type path
SkillGain.dm:614:error:/mob/W:undefined type path
SkillGain.dm:622:error:W.overlays:undefined var
SkillGain.dm:623:error:Y.overlays:undefined var
SkillGain.dm:624:error:Z.overlays:undefined var
SkillGain.dm:626:error:W.HP:undefined var
SkillGain.dm:627:error:Y.HP:undefined var
SkillGain.dm:628:error:Z.HP:undefined var
SkillGain.dm:630:error:W.overlays:undefined var
SkillGain.dm:631:error:Y.overlays:undefined var
SkillGain.dm:632:error:Z.overlays:undefined var
SkillGain.dm:609:if :warning: if statement has no effect
SkillGain.dm:616:= :warning: assignment of procedural properties takes place at compile-time. Move this to the top of the procedure to avoid this warning.
SkillGain.dm:612:W :warning: variable defined but not used
SkillGain.dm:613:Y :warning: variable defined but not used
SkillGain.dm:614:Z :warning: variable defined but not used
In response to Pharaoh Atem
is bshot a obj ?????/?// if so

Z.overlays -= /obj/bshot



try this



~JRR-Zero
In response to JRR-Zero
JRR-Zero wrote:
is bshot a obj ?????/?// if so

> Z.overlays -= /obj/bshot
>

try this



~JRR-Zero

its a DEFINED var
In response to Pharaoh Atem
ok dont need TO TALK IN CAPS god
In response to Pharaoh Atem
You have made TWO threads about this, bad.
Please respond to your other post.
In response to Artemio
Artemio wrote:
You have made TWO threads about this, bad.
Please respond to your other post.

nobody answers me correctly >(
In response to JRR-Zero
JRR-Zero wrote:
ok dont need TO TALK IN CAPS god

JRR, stop attempting to help; your "help" isn't correct, and it's just wasting forum space.. I am not meaning to offend you or anything similar to that..

O-matic
In response to Pharaoh Atem
Where in the world did you get that from?
And how does that justify your creation of two threads?
In response to O-matic
kk O-matic ill do what u say your a well good coder and i am spamming fourm a bit ill delete all my posts on this topic



O-matic
RULES


lol
In response to Pharaoh Atem
mob
verb
Summon_Bass()
set category = "Fight"
if(M.Custom >= 50)
var/temp = M.icon // hold the icon in a variable
for(var/mob/M in oview(3))
if(!M)
usr<<"Error: There isn't a mob in your sight!"
return
var/mob/E = new (/mob/E(locate(M.x,M.y,M.z)))
usr.icon = 'bass_summ.dmi'
spawn(15)
view(5)<< "<font color = brown><BIG>[M] : Multi Gun!!!! </BIG></font>"
E.overlays += /obj/bshot
sleep(1)
E.HP -= 220
sleep(3)
E.overlays += /obj/bshot
sleep(1)
usr.icon = temp
E.overlays -= /obj/bshot
else
usr << "You Dont Have Enough Custom!"
return


I took the care to fix the code up a bit. I highly recommend you to re-read the DM-Guide. You will never finish a proper game if you keep going on like this.

Writing 'overlay' instead of 'overlays', directly copy+pasting from the forums.. Watch out before you turn into Govegtos #2! Re-read the DM guide, that is my advice.

Your weak points:
- Defining variables. You are extremely bad at it. And you barely know anything about them.
- You need some more logic, and a better organized programming-style.
- You can't remember the built-in procs/variables; you keep misspelling them I.E: 'overlay' instead of 'overlays'..

I am not attempting to offend you, but I am attempting to make you aware that you're going into the bad direction..

O-matic
In response to Artemio
listen Pharaoh Atem ,

PEOPLE YOU RESPECT ON FOURM !!!!!


Artemio - great coder dont get on his bad side
O-matic - great coder funny(zen/zeta posts, LoL) & cool
ADMINS/MODERATORS - they can be kind or crul
and other people i didnt metion, if some one replie to your post that means there trying to help so you've got to give them a bit of respect too.

this fourm is the WORLD !!!!!!!!!
In response to JRR-Zero
I am definately not a "great coder".
Also, it isn't a "fourm", it's a "forum".

O-Matic, never put a space between a value and an attribute, referring to the font tag you didn't edit. Why is the "bshot" overlay added twice, anyways? Lastly, why is there a return on the else statement? There's no need for it.
In response to Artemio
Artemio wrote:
I am definately not a "great coder".
Also, it isn't a "fourm", it's a "forum".

O-Matic, never put a space between a value and an attribute, referring to the font tag you didn't edit. Why is the "bshot" overlay added twice, anyways? Lastly, why is there a return on the else statement? There's no need for it.


ok, ok, but...

What is null.overlays????
In response to JRR-Zero
People, i've think and now i will make this in procks, like: if is a mob on oview 2, do the XXXX proc, if is a mob on oview 1, do the YYYYY proc, and if is a mob on oview 3, do the ZZZZZZ proc, but...how i do this on coding?
In response to Pharaoh Atem
Yeah, funny that trying to give a mob a variable they already have causes an error that tells you you've tried to define a variable that mobs already have.

And your usage of the word 'usr' suggests to me that you don't know what it is.

Read this: http://www.byond.com/docs/guide/
In response to Jp
sdfsd.dm is from zeta. Stop stealing and please learn to program! :(
In response to XzDoG
Wrong post, mate.
In response to XzDoG
I dont steal this!!!

i maked this a new .dm file with my vars, player verbs, combat system, and leveling up system!!!!

dont say about what you dont know!!!
In response to Artemio
Artemio wrote:
I am definately not a "great coder".

Same goes for me, JRR-Zero. I am not the "great coder" you think I am. Though, it is a matter of opinion.

O-matic, never put a space between a value and an attribute, referring to the font tag you didn't edit.

When I edited his code, I only retabbed some things, and fixed his issues with the variables; I did not refer to any text-outputs and such.

Why is the "bshot" overlay added twice, anyways? \

That isn't a question wich I can answer, the answer lies somewhere in Pharaoh Atem's brains, he attempted to add two "bshot" overlays, not me; I only corrected a typo... :/

Lastly, why is there a return on the else statement? There's no need for it.

I always say: Better have something extra than nuthin'.

O-matic
Page: 1 2 3