ID:139184
 
Can't figure out where i'm missing a "," or "parenthesis"

Code:
verb
Manage_Permissions()
if(usr.name != Imprint)return
----> switch(alert(usr),"What would you like to do?!\nPe(Permission"\n"]",Name,"Add","Remove","Cancel,")
if("Add")
Permission.Add(input("Type the name of the person who you would like to give Permission!") as text)
if("Remove")
Permission.Remove(input("Who would you like to remove the Permission from?") in Permission)


TARDIS.dm:30:error: missing comma ',' or right-paren ')'


Raeltors wrote:
Can't figure out where i'm missing a "," or "parenthesis"

Code:
verb
> Manage_Permissions()
> if(usr.name != Imprint)return
> ----> switch(alert(usr),"What would you like to do?!\nPe(Permission"\n"]",Name,"Add","Remove","Cancel,")
> if("Add")
> Permission.Add(input("Type the name of the person who you would like to give Permission!") as text)
> if("Remove")
> Permission.Remove(input("Who would you like to remove the Permission from?") in Permission)
>

TARDIS.dm:30:error: missing comma ',' or right-paren ')'



According to the reference page for alert(), the problem lies in that your parentheses are in the wrong place.

switch ( alert ( "message", "title", "option 1", "option 2", "option 3" ) )

Note, usr is not required in alert() here because it by default the usr.
In response to LordAndrew
alright done. but now it pops up errors with "dd_list2text".. what can i replace "dd_list2text" with?
In response to Raeltors
Eh? Show me the code where that's happening.
In response to LordAndrew
mob
proc
Control()
for(var/A in Admins)
var/list/Admin = dd_text2list(A,",")
if(Admin[1] == key)
for(var/V in Admin)
switch(V)

"CUT"

Screen_Stats()
var
Width = dd_text2list(winget(src,"SM","size"),"x")
HPS = round(Health/Max_Health*text2num(Width[1]),1)
ENS = round(Energy/Max_Energy*text2num(Width[1]),1)
sizes = dd_text2list(winget(src,"MapI","size"),"x")


And a few others..

loading One Piece.dme
loading Interface.dmf
Control Panel.dm:47:error: dd_text2list: undefined proc
Interface.dm:599:error: dd_text2list: undefined proc
Interface.dm:602:error: dd_text2list: undefined proc
Control Panel.dm:84:error: dd_text2list: undefined proc
Control Panel.dm:128:error: dd_text2list: undefined proc
Control Panel.dm:15:error: dd_text2list: undefined proc
Control Panel.dm:27:error: dd_text2list: undefined proc
TARDIS.dm:30:error: dd_list2text: undefined proc
Devil Fruit System.dm:631:error: dd_list2text: undefined proc
Tournament System.dm:127:error: dd_list2text: undefined proc

One Piece.dmb - 10 errors, 0 warnings (double-click on an error to jump to it)


In response to Raeltors
That's when you don't use code someone else made.~ But in all reality, it's a lib, that is downloadable on byond, just search for it.