2026-02-11 18:35:50 +01:00
|
|
|
void M_SetLine(string LineName, int LineNumber, double price, color Clr)
|
2026-02-11 17:37:48 +01:00
|
|
|
{
|
2026-02-11 18:35:50 +01:00
|
|
|
string FullLineName = LineName + IntegerToString(LineNumber);
|
|
|
|
|
|
|
|
|
|
// check if object exists, otherwise create a new one
|
|
|
|
|
if(ObjectFind(0, FullLineName) < 0)
|
|
|
|
|
{
|
|
|
|
|
M_CreateLine(FullLineName, Clr, price);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Move endpoint to actual time
|
|
|
|
|
ObjectMove(0, FullLineName, 1, TimeCurrent(), price);
|
|
|
|
|
|
|
|
|
|
}
|
2026-02-11 17:37:48 +01:00
|
|
|
}
|