lua help

All development conversation and discussion takes place here

Moderator: Moderator

Post Reply
Message
Author
jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

lua help

#1 Post by jenx »

in the following line:

if target.type.."/"..target.subtype == t or target.type == t then dam = dam + dam * idt / 100 break end

i want to add a second instruction after the dam = ..., such as:

if target.type.."/"..target.subtype == t or target.type == t then
dam = dam + dam * idt / 100
maxdam = maxdam + maxdam * idt /100
break
end

is this correct? I'm not sure about the "break".
MADNESS rocks

Grey
Loremaster
Posts: 3517
Joined: Thu Sep 23, 2010 10:18 pm
Location: London, England
Contact:

Re: lua help

#2 Post by Grey »

Get rid of the break and it's fine. The break is for loops which you're not using here. I don't know what the .. means in if target.type.."/"..target.subtype == t though.
http://www.gamesofgrey.com - My own T-Engine games!
Roguelike Radio - A podcast about roguelikes

Post Reply