Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

cpInventoryHelpStringAtr

Matěj Štágl edited this page Dec 26, 2017 · 5 revisions

Popis:

Simplex předpokládá výchozí datový typ pro všechny položky z výčtu e_inventoyAtributes real. Pro některé položky je potřeba typ string. Proto existuje skript cpInventoryHelpStringAtr, který vrací datový typ daného indexu. Pro přidání nové položky do výčtu e_inventoyAtributes (pokud má být typu string), je potřeba ji uvést ve formě disjunkce v tomto skriptu.

Výchozí string položky:

  • valInfoTextBody
  • valInfoTextHead
  • valInfoTextFooter
  • valOptions

Syntax:

cpInventoryHelpIsStringAtr(index);

Argumenty:

Argument Typ Popis
index e_inventoyAtributes Index položky

Návrat:

1: Index je string
0: Index je int

Příklad:

// Iteruje všechny atributy z výčtu e_inventoryAtributes pomocí makra mcInventoryAtributes
for (var i = 0; i < mcInvenotryAtributes; i++)
{
 // Vypíše datový typ aktuálního atributu
 if (cpInventoryHelpIsStringAtr(i))
 {
 show_debug_message("Atribute n" + string(i) + " is string!");
 }
 else
 {
 show_debug_message("Atribute n" + string(i) + " is int!");
 }
}

Output


Inventář

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /