[Script] Convert to INT 2693 2

O temacie

Autor Vic7im

Zaczęty 24.03.2016 roku

Wyświetleń 2693

Odpowiedzi 2

Vic7im

Vic7im

Użytkownicy
posty84
Propsy92
Profesjabrak
  • Użytkownicy
Hey guys!

Does anyone know how to convert an item name into an ID (integer)? I've seen in some scripts that certain items are called by a numerical sequence (I guess it's their ID), how can I do that?


I'm using this function but I don't know if it returns the ID.
var int ABC;
ABC =  Hlp_GetInstanceID(itat_item);

I've also tried putting an ID=*numericalsequence* within the item instance, but to no avail.


Thanks in advance!
 

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5239
NagrodyV
ProfesjaProgramista
  • Administrator
I'm not sure what you mean. Converting item name (string) or identifier (name for numerical ID)?
As for the first case, I'm fairly sure that it is useless. For the second case, you don't need to do anything - in Daedalus identifiers already point to numerical ID of definition instead of actual instance.
var int ABC;
AbC = itat_item;

Vic7im

Vic7im

Użytkownicy
posty84
Propsy92
Profesjabrak
  • Użytkownicy
I'm not sure what you mean. Converting item name (string) or identifier (name for numerical ID)?
As for the first case, I'm fairly sure that it is useless. For the second case, you don't need to do anything - in Daedalus identifiers already point to numerical ID of definition instead of actual instance.
var int ABC;
AbC = itat_item;

Yes, it was a very stupid question. Thanks anyway and sorry!
Can close mods :D
 


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry