- Joined
- Sep 12, 2008
- Messages
- 657
Hi, i was wonder if its possible to do this:
so basicly, the struct gives you the value in the variable called data, instead of the integer.
is it possible?
Sorry if you dont understand, i'm bad at explaining things..
Thanks in advance..
JASS:
struct strExtension
string data = ""
public method operator = takes string data returns nothing
set .data = data
//Here lies the problem btw, theres no method operator =
endmethod
public method operator == takes strExtension s returns boolean
return .data == s.data
endmethod
endstruct
library X initializer onInit
private function onInit takes nothing returns nothing
local strExtension s = "Hello"
if s == "Hello" then
//Actions #1
else
//Actions #2
endif
endfunction
endlibrary
is it possible?
Sorry if you dont understand, i'm bad at explaining things..
Thanks in advance..