code problem with switch

Talk about whatever topic you'd like, RPG related or not. (But please discuss things related to our software in the Tools section, below.)

Moderators: Azhrei, dorpond, trevor

Post Reply
wisewolf
Cave Troll
Posts: 79
Joined: Tue Aug 06, 2019 10:50 am

code problem with switch

Post by wisewolf »

[edited] Problem solved.
Last edited by wisewolf on Wed Nov 27, 2019 7:35 am, edited 2 times in total.

wisewolf
Cave Troll
Posts: 79
Joined: Tue Aug 06, 2019 10:50 am

Re: code problem with switch

Post by wisewolf »

Ok I had some problems with the code, this is the edited code, but still the same error:
[H, SWITCH(Acciones):
case "1":
{
[h:setState ("AC 1" , 0,ultimoIniciativa)]
[h:setState ("AC 2" , 0,ultimoIniciativa)]
[h:setState ("AC 3" , 0,ultimoIniciativa)]
[h:setState ("AC 4" , 0,ultimoIniciativa)]
[h:setState ("AC 5" , 0,ultimoIniciativa)]
};
case "2":
{
[h:setState ("AC 1" , 1,ultimoIniciativa)]
[h:setState ("AC 2" , 0,ultimoIniciativa)]
[h:setState ("AC 3" , 0,ultimoIniciativa)]
[h:setState ("AC 4" , 0,ultimoIniciativa)]
[h:setState ("AC 5" , 0,ultimoIniciativa)]
};
case "3":
{
[h:setState ("AC 1" , 0,ultimoIniciativa)]
[h:setState ("AC 2" , 1,ultimoIniciativa)]
[h:setState ("AC 3" , 0,ultimoIniciativa)]
[h:setState ("AC 4" , 0,ultimoIniciativa)]
[h:setState ("AC 5" , 0,ultimoIniciativa)]
};
case "4":
{
[h:setState ("AC 1" , 0,ultimoIniciativa)]
[h:setState ("AC 2" , 0,ultimoIniciativa)]
[h:setState ("AC 3" , 1,ultimoIniciativa)]
[h:setState ("AC 4" , 0,ultimoIniciativa)]
[h:setState ("AC 5" , 0,ultimoIniciativa)]
};
case "5":
{
[h:setState ("AC 1" , 0,ultimoIniciativa)]
[h:setState ("AC 2" , 0,ultimoIniciativa)]
[h:setState ("AC 3" , 0,ultimoIniciativa)]
[h:setState ("AC 4" , 1,ultimoIniciativa)]
[h:setState ("AC 5" , 0,ultimoIniciativa)]
};]

User avatar
aliasmask
Deity
Posts: 8579
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: code problem with switch

Post by aliasmask »

No ; after the last brace.

Post Reply

Return to “General Discussion”