ID:1271096
 
(See the best response by Stephen001.)
Code:
mob/Admin3/verb //invalid expression
Add_Perk(mob/M in world)
set category="Admin"
var/s=input("Would you like to give [M] a perk?")in list("Yes")+"Cancel"
if(s=="Yes")





statpanel("Perks")
stat("List of Perks")
for(var/obj/Perk)






obj/Perk //invalid expression
var
name //duplicate definition
description
notes
Click()
world<< "[usr] Activates: " //bad var definition


Problem description:

You're indentation is all whack.

mob/Admin3
verb
Add_Perk(mob/M in world)
set category="Admin"
var/s=input("Would you like to give [M] a Perk?")in list("Yes")+"Cancel"
if(s=="Yes")
// Missing code?




statpanel("Perks")
stat("List of Perks")
for(var/obj/Perk)
// Are you missing code here?





obj/Perk // obj already has a name variable.
var
description
notes

Click()
world<< "[usr] Activates: "
In response to Stephen001
Stephen001 wrote:
You're indentation is all whack.

> mob/Admin3
> verb
> Add_Perk(mob/M in world)
> set category="Admin"
> var/s=input("Would you like to give [M] a Perk?")in list("Yes")+"Cancel"
> if(s=="Yes")
> // Missing code?
>
>
>
>
> statpanel("Perks")
> stat("List of Perks")
> for(var/obj/Perk)
> // Are you missing code here?
>
>
>
>
>
> obj/Perk // obj already has a name variable.
> var
> description
> notes
>
> Click()
> world<< "[usr] Activates: "
>


thanks XD
yeah im not finished putting in the code its far from finished
If that's helped you out, could you vote for that answer? Just helps other people see which answers helped the posters best.
In response to Stephen001
Stephen001 wrote:
If that's helped you out, could you vote for that answer? Just helps other people see which answers helped the posters best.

Ok, also not to push for even more after you helped me this much, but the perk obj needs to have a name var of some sort that is editable how would i make that?
Best response
Unless I'm mistaken, the default 'name' variable for objects is editable? So you can just assign it:

obj/Perk/TestPerk
name = "Test Perk"


If not though, add a perk_name variable.
In response to Stephen001
Stephen001 wrote:
Unless I'm mistaken, the default 'name' variable for objects is editable? So you can just assign it:

> obj/Perk/TestPerk
> name = "Test Perk"
>

If not though, add a perk_name variable.

god thnks xD i was thinking after i asked that it might be editable, but i wasnt sure