switch(type)
if("kage")
switch(country)
if("fire")
if(Kages["Hokage"])
user << "There is already a Hokage.";return 0
Kages["Hokage"] = M
world << "[M] is the new Hokage.";return 1
Problem description:
I got bad index, where its if(Kages["Hokage"])
ID:141565
![]() Jan 22 2009, 12:22 pm
|
|
Code:
switch(type) Problem description: I got bad index, where its if(Kages["Hokage"]) |
![]() Jan 22 2009, 12:24 pm
|
|
If you try and find the associated value of an element that isn't there, you'll get an error. Try if("Hokage" in Kages).
|