Author Topic: compile_scripts  (Read 5792 times)

compile_scripts
« on: October 22, 2014, 06:47:38 am »
compile.bat isnt working shows this:



what is wrong? how to fix this?

i tried running ASCompiler by itself too, it instantly closes out as soon as i open it
« Last Edit: October 22, 2014, 07:29:17 am by Ethanhoff »

JovankaB

  • Guest
Re: compile_scripts
« Reply #1 on: October 22, 2014, 09:32:12 am »
You have to run ASCompiler with the name of the script as its first argument:
Code: [Select]
ASCompiler TheNameOfTheScript.fos
If you don't know how to do that, google "windows command line tutorial" or "how to run program with parameter in windows"

Re: compile_scripts
« Reply #2 on: October 23, 2014, 02:26:31 am »
this is what i get when i try to compile a script

Code: [Select]
FOnline AngleScript compiler. Usage:
ASCompiler script_name.fos
 [-client] (compile client scripts)
 [-mapper] (compile mapper scripts)
 [-p preprocessor_output.txt]
 [-d SOME_DEFINE]*
 [-run func_name]*
 [-gc] (collect garbage after execution)
*can be used multiple times

C:\FODM\Server\scripts>ascompiler.exe client_interface.fos
Compiling client_interface.fos ...
./client_gui_ex.fos(1018) : ERROR : Identifier 'CritterCl' is not a data type in
 global namespace.
./client_gui_ex.fos(1027) : ERROR : Identifier 'ItemCl' is not a data type in gl
obal namespace.
./lexems_h.fos(61) : ERROR : Identifier 'CritterCl' is not a data type in global
 namespace.
./lexems_h.fos(62) : ERROR : Identifier 'ItemCl' is not a data type in global na
mespace.
./lexems_h.fos(64) : ERROR : Identifier 'CritterCl' is not a data type in global
 namespace.
./lexems_h.fos(65) : ERROR : Identifier 'ItemCl' is not a data type in global na
mespace.
./lexems_h.fos(65) : ERROR : A function with the same name and parameters alread
y exists.
./lexems_h.fos(68) : ERROR : Identifier 'CritterCl' is not a data type in global
 namespace.
./lexems_h.fos(69) : ERROR : Identifier 'ItemCl' is not a data type in global na
mespace.
./lexems_h.fos(69) : ERROR : A function with the same name and parameters alread
y exists.
./lexems_h.fos(73) : ERROR : Identifier 'CritterCl' is not a data type in global
 namespace.
./lexems_h.fos(74) : ERROR : Identifier 'ItemCl' is not a data type in global na
mespace.
./lexems_h.fos(74) : ERROR : A function with the same name and parameters alread
y exists.
./lexems_h.fos(77) : ERROR : Identifier 'CritterCl' is not a data type in global
 namespace.
./lexems_h.fos(78) : ERROR : Identifier 'ItemCl' is not a data type in global na
mespace.
./lexems_h.fos(78) : ERROR : A function with the same name and parameters alread
y exists.
./prod_ingredients_h.fos(33) : ERROR : Identifier 'ItemCl' is not a data type in
 global namespace.
./prod_ingredients_h.fos(34) : ERROR : Identifier 'ItemCl' is not a data type in
 global namespace.
./prod_ingredients_h.fos(35) : ERROR : Identifier 'ItemCl' is not a data type in
 global namespace.
./prod_ingredients_h.fos(37) : ERROR : Identifier 'ItemCl' is not a data type in
 global namespace.
./client_smart_cursor_h.fos(24) : ERROR : Identifier 'ItemCl' is not a data type
 in global namespace.
./client_smart_cursor_h.fos(24) : ERROR : Identifier 'ItemCl' is not a data type
 in global namespace.
./item_dogtags_h.fos(24) : ERROR : Identifier 'ItemCl' is not a data type in glo
bal namespace.
./item_dogtags_h.fos(27) : ERROR : Identifier 'ItemCl' is not a data type in glo
bal namespace.
./item_dogtags_h.fos(29) : ERROR : Identifier 'ItemCl' is not a data type in glo
bal namespace.
client_interface.fos(44) : ERROR : Identifier 'CritterCl' is not a data type in
global namespace.
client_interface.fos(62) : ERROR : Identifier 'CritterCl' is not a data type in
global namespace.
client_interface.fos(833) : ERROR : Identifier 'ItemCl' is not a data type in gl
obal namespace.
client_interface.fos(1043) : ERROR : Identifier 'CritterCl' is not a data type i
n global namespace.
client_interface.fos(1525) : ERROR : Identifier 'CritterCl' is not a data type i
n global namespace.
client_interface.fos(2119) : ERROR : Identifier 'CritterCl' is not a data type i
n global namespace.
client_interface.fos(2124) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
client_interface.fos(2127) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
client_interface.fos(2127) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
client_interface.fos(2130) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
client_interface.fos(2135) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
client_interface.fos(2138) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
client_interface.fos(2143) : ERROR : Identifier 'ItemCl' is not a data type in g
lobal namespace.
./sprite.fos(23) : INFO : Compiling bool Sprite::Load(string&inout, int).
./sprite.fos(27) : ERROR : No matching signatures to 'LoadSprite(string&, int)'.

./sprite.fos(36) : INFO : Compiling void Sprite::LoadHash(uint, uint8).
./sprite.fos(38) : ERROR : No matching signatures to 'LoadSprite(uint, uint8)'.
./sprite.fos(42) : INFO : Compiling void Sprite::LoadByIni(string&inout, int).
./sprite.fos(44) : ERROR : No matching signatures to 'GetIfaceIniStr(string&)'.
./sprite.fos(46) : ERROR : No matching signatures to 'LoadSprite(string@&, int)'
.
./sprite.fos(52) : INFO : Compiling void Sprite::Draw(int, int).
./sprite.fos(55) : ERROR : No matching signatures to 'DrawSprite(uint&, const in
t, int, int, const int)'.
./sprite.fos(58) : INFO : Compiling void Sprite::RefreshData().
./sprite.fos(62) : ERROR : No matching signatures to 'GetSpriteWidth(uint&, cons
t int)'.
./sprite.fos(63) : ERROR : No matching signatures to 'GetSpriteHeight(uint&, con
st int)'.
./sprite.fos(64) : ERROR : No matching signatures to 'GetSpriteCount(uint&)'.
./client_gui_ex.fos(167) : INFO : Compiling IControl@ Control::Position(string&i
nout).
./client_gui_ex.fos(175) : ERROR : No matching signatures to 'GetIfaceIniStr(str
ing&)'.
./client_gui_ex.fos(253) : INFO : Compiling void Control::ShowWindow().
./client_gui_ex.fos(255) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(257) : INFO : Compiling void Control::ShowWindow(int, int).
./client_gui_ex.fos(259) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(261) : INFO : Compiling void Control::HideWindow().
./client_gui_ex.fos(263) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(462) : INFO : Compiling CButton::CButton(int, int, int, int,
 string&inout).
./client_gui_ex.fos(467) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(471) : INFO : Compiling CButton::CButton(int, int, int, int,
 string&inout, string&inout).
./client_gui_ex.fos(474) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(476) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(480) : INFO : Compiling CButton::CButton(string&inout, strin
g&inout).
./client_gui_ex.fos(485) : ERROR : No matching signatures to 'Message(string@&)'
.
./client_gui_ex.fos(494) : INFO : Compiling void CButton::Draw().
./client_gui_ex.fos(499) : ERROR : No matching signatures to 'DrawSprite(uint&,
const int, int, int, const int)'.
./client_gui_ex.fos(504) : ERROR : No matching signatures to 'DrawSprite(uint&,
const int, int, int, const int)'.
./client_gui_ex.fos(508) : ERROR : No matching signatures to 'DrawText(string, i
nt, int, int, int, int, const int, uint)'.
./client_gui_ex.fos(525) : INFO : Compiling void CDialogRedButton::Draw().
./client_gui_ex.fos(528) : ERROR : No matching signatures to 'DrawSprite(uint&,
const int, int, int, const int)'.
./client_gui_ex.fos(544) : INFO : Compiling void CSmallButton::Draw().
./client_gui_ex.fos(547) : ERROR : No matching signatures to 'DrawSprite(uint&,
const int, int, int, const int)'.
./client_gui_ex.fos(649) : INFO : Compiling void CLabel::Draw().
./client_gui_ex.fos(651) : ERROR : No matching signatures to 'DrawText(string@&,
 int, int, int, int, int&, int&, int&)'.
./client_gui_ex.fos(761) : INFO : Compiling void CTextBox::InsertChar(uint8).
./client_gui_ex.fos(764) : ERROR : No matching signatures to 'string::resize(con
st int)'.
./client_gui_ex.fos(768) : ERROR : No matching signatures to 'string::set_opInde
x(const int, uint8)'.
./client_gui_ex.fos(768) : INFO : Candidates are:.
./client_gui_ex.fos(768) : INFO : void string::set_opIndex(int, const string&in)
 const.
./client_gui_ex.fos(773) : INFO : Compiling void CTextBox::Draw().
./client_gui_ex.fos(789) : ERROR : No matching signatures to 'DrawText(string, i
nt, int, int, int, int&, int&, int&)'.
./client_gui_ex.fos(873) : INFO : Compiling void CSprite::Draw().
./client_gui_ex.fos(875) : ERROR : No matching signatures to 'DrawSprite(uint&,
const int, int, int, const int)'.
./client_gui_ex.fos(919) : INFO : Compiling void CSpriteEx::Draw().
./client_gui_ex.fos(922) : ERROR : No matching signatures to 'DrawSprite(uint&,
int&, int, int, int&, int&, bool&, bool&, uint&, bool&)'.
./client_gui_ex.fos(978) : INFO : Compiling void CListBox::Draw().
./client_gui_ex.fos(982) : ERROR : No matching signatures to 'DrawText(string@&,
 int, int, int, uint&, uint, const int, const uint)'.
./client_gui_ex.fos(1018) : INFO : Compiling void CContextButton::SetCritter(int
).
./client_gui_ex.fos(1021) : ERROR : Object handle is not supported for this type
.
./client_gui_ex.fos(1022) : ERROR : 'Id' is not a member of 'int'.
./client_gui_ex.fos(1027) : INFO : Compiling void CContextButton::SetItem(int).
./client_gui_ex.fos(1030) : ERROR : Object handle is not supported for this type
.
./client_gui_ex.fos(1031) : ERROR : 'Id' is not a member of 'int'.
./client_gui_ex.fos(1082) : INFO : Compiling void Window::Center().
./client_gui_ex.fos(1084) : ERROR : '__ScreenHeight' is not declared.
./client_gui_ex.fos(1084) : ERROR : '__ScreenWidth' is not declared.
client_interface.fos(85) : INFO : Compiling CDialogImage::CDialogImage().
client_interface.fos(87) : ERROR : No matching signatures to 'DMessage(string@&)
'.
client_interface.fos(91) : INFO : Compiling void CDialogImage::Set(int, int, str
ing&inout).
client_interface.fos(95) : ERROR : No matching signatures to 'LoadSprite(string&
, const int)'.
client_interface.fos(96) : ERROR : No matching signatures to 'DMessage(string@&)
'.
client_interface.fos(99) : INFO : Compiling void CDialogImage::Unset().
client_interface.fos(104) : ERROR : No matching signatures to 'DMessage(string@&
)'.
client_interface.fos(119) : INFO : Compiling void CDialogImage::Draw().
client_interface.fos(126) : ERROR : No matching signatures to 'GetHardcodedScree
nPos(int, int, int)'.
client_interface.fos(135) : ERROR : No matching signatures to 'DrawSprite(int&,
const int, int, int, const int)'.
client_interface.fos(190) : INFO : Compiling void CWorldmapElement::Draw(uint).
client_interface.fos(195) : ERROR : '__GmapZoom' is not declared.
client_interface.fos(195) : ERROR : '__GmapOffsetY' is not declared.
client_interface.fos(195) : ERROR : '__GmapOffsetX' is not declared.
client_interface.fos(197) : ERROR : No matching signatures to 'DrawText(string,
int, int, uint&, uint&, uint&, int&, int&)'.
client_interface.fos(1615) : INFO : Compiling void BagCallbackHide::OnHide(int,
int, int).
client_interface.fos(1618) : ERROR : No matching signatures to 'RefreshItemsColl
ection(const int)'.
client_interface.fos(389) : INFO : Compiling void render_iface(uint).
client_interface.fos(410) : ERROR : Unexpected variable declaration.
client_interface.fos(413) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(421) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(422) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(473) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(476) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(483) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(486) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(496) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(508) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(509) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(578) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(606) : INFO : Compiling string generic_description(int, int
&inout, int&inout).
client_interface.fos(608) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(626) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(704) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(833) : INFO : Compiling string item_description(int&inout,
int).
client_interface.fos(835) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(1043) : INFO : Compiling string critter_description(int&ino
ut, int).
client_interface.fos(1244) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(1311) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(1466) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(1534) : INFO : Compiling void _SetColor(int, int, int, stri
ng@, int[]@).
client_interface.fos(1536) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(1565) : INFO : Compiling void _RepairSession(int, int, int,
 string@, int[]@).
client_interface.fos(1569) : ERROR : No matching signatures to 'RefreshItemsColl
ection(const int)'.
client_interface.fos(1630) : INFO : Compiling void IndicatorMouse(bool, int).
client_interface.fos(1639) : ERROR : '__MouseY' is not declared.
client_interface.fos(1639) : ERROR : '__MouseX' is not declared.
client_interface.fos(1646) : INFO : Compiling bool ReadIniInt(string&inout, int&
inout).
client_interface.fos(1648) : ERROR : No matching signatures to 'GetIfaceIniStr(s
tring&)'.
client_interface.fos(1652) : INFO : Compiling void InitIndicators().
client_interface.fos(1654) : ERROR : '__IndicatorType' is not declared.
client_interface.fos(1662) : ERROR : '__ScreenWidth' is not declared.
client_interface.fos(1674) : ERROR : '__ScreenHeight' is not declared.
client_interface.fos(1675) : WARNING : 'IntY' is not initialized..
client_interface.fos(1679) : ERROR : No matching signatures to 'GetIfaceIniStr(s
tring@&)'.
client_interface.fos(1685) : ERROR : No matching signatures to 'GetIfaceIniStr(s
tring@&)'.
client_interface.fos(1699) : INFO : Compiling void DrawIndicators().
client_interface.fos(1709) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(1712) : ERROR : Identifier 'ItemCl' is not a data type.
client_interface.fos(1875) : INFO : Compiling void DrawIndicator(Rect@, int[]&in
out, uint, int, uint&inout, bool, bool, uint = 35).
client_interface.fos(1928) : ERROR : No matching signatures to 'DrawPrimitive(co
nst int, int[]&)'.
client_interface.fos(1931) : INFO : Compiling void DrawCounter(Rect@, string&ino
ut, uint, int).
client_interface.fos(1933) : ERROR : No matching signatures to 'DrawText(string&
, int&, int&, int&, int&, uint, int, const int)'.
client_interface.fos(1962) : INFO : Compiling void DrawArea(uint, uint8).
client_interface.fos(1967) : ERROR : Identifier 'CritterCl' is not a data type.
client_interface.fos(2027) : INFO : Compiling void DrawInsideStatus(bool).
client_interface.fos(2029) : ERROR : '__ScreenWidth' is not declared.
client_interface.fos(2053) : INFO : Compiling void InitAreas().
client_interface.fos(2056) : ERROR : No matching signatures to 'IPolygon::GetTri
angulation(uint16[])'.
client_interface.fos(2058) : ERROR : No matching signatures to 'IPolygon::GetTri
angulation(uint16[])'.
client_interface.fos(2060) : ERROR : No matching signatures to 'IPolygon::GetTri
angulation(uint16[])'.
client_interface.fos(2062) : ERROR : No matching signatures to 'IPolygon::GetTri
angulation(uint16[])'.
client_interface.fos(2064) : ERROR : No matching signatures to 'IPolygon::GetTri
angulation(uint16[])'.
client_interface.fos(2066) : ERROR : No matching signatures to 'IPolygon::GetTri
angulation(uint16[])'.
Unable to build.

any ideas ?

JovankaB

  • Guest
Re: compile_scripts
« Reply #3 on: October 23, 2014, 06:24:13 am »
Client scripts (the ones that have filenames starting with "client_") require additional -client argument when you use ASCompiler. So try:

Code: [Select]
ascompiler.exe client_interface.fos -client
Similarly you have to use -mapper argument for mapper scripts.
« Last Edit: October 23, 2014, 06:28:17 am by JovankaB »

Re: compile_scripts
« Reply #4 on: October 23, 2014, 08:10:41 pm »
Hmm, I try it with -client and get this:

Code: [Select]
C:\FODM\Server\scripts>ascompiler.exe client_interface.fos -client
Compiling client_interface.fos ...
./sprite.fos(36) : INFO : Compiling void Sprite::LoadHash(uint, uint8).
./sprite.fos(38) : ERROR : No matching signatures to 'LoadSprite(uint, uint8)'.
./sprite.fos(38) : INFO : Candidates are:.
./sprite.fos(38) : INFO : uint LoadSprite(string&inout name, int pathIndex).
./sprite.fos(38) : INFO : uint LoadSprite(uint nameHash).
./client_gui_ex.fos(761) : INFO : Compiling void CTextBox::InsertChar(uint8).
./client_gui_ex.fos(764) : ERROR : No matching signatures to 'string::resize(con
st int)'.
./client_gui_ex.fos(768) : ERROR : No matching signatures to 'string::set_opInde
x(const int, uint8)'.
./client_gui_ex.fos(768) : INFO : Candidates are:.
./client_gui_ex.fos(768) : INFO : void string::set_opIndex(int, const string&in)
 const.
./client_gui_ex.fos(919) : INFO : Compiling void CSpriteEx::Draw().
./client_gui_ex.fos(922) : ERROR : No matching signatures to 'DrawSprite(uint&,
int&, int, int, int&, int&, bool&, bool&, uint&, bool&)'.
./client_gui_ex.fos(922) : INFO : Candidates are:.
./client_gui_ex.fos(922) : INFO : void DrawSprite(uint sprId, int frameIndex, in
t x, int y, uint color = 0, bool applyOffsets = false).
./client_gui_ex.fos(922) : INFO : void DrawSprite(uint sprId, int frameIndex, in
t x, int y, int w, int h, bool zoom = false, uint color = 0, bool applyOffsets =
 false).
client_interface.fos(190) : INFO : Compiling void CWorldmapElement::Draw(uint).
client_interface.fos(195) : ERROR : No matching signatures to 'DrawSprite(uint&,
 const int, float, float, float, float, bool&, bool&, uint&, bool&)'.
client_interface.fos(195) : INFO : Candidates are:.
client_interface.fos(195) : INFO : void DrawSprite(uint sprId, int frameIndex, i
nt x, int y, uint color = 0, bool applyOffsets = false).
client_interface.fos(195) : INFO : void DrawSprite(uint sprId, int frameIndex, i
nt x, int y, int w, int h, bool zoom = false, uint color = 0, bool applyOffsets
= false).
client_interface.fos(197) : WARNING : Float value truncated in implicit conversi
on to integer.
client_interface.fos(197) : WARNING : Float value truncated in implicit conversi
on to integer.
client_interface.fos(389) : INFO : Compiling void render_iface(uint).
client_interface.fos(410) : ERROR : Unexpected variable declaration.
client_interface.fos(1043) : INFO : Compiling string critter_description(Critter
Cl&inout, int).
client_interface.fos(1292) : WARNING : Signed/Unsigned mismatch.
client_interface.fos(1292) : ERROR : No conversion from 'string@&' to 'uint' ava
ilable..
client_interface.fos(1327) : WARNING : Signed/Unsigned mismatch.
client_interface.fos(1327) : ERROR : No conversion from 'string@&' to 'uint' ava
ilable..
client_interface.fos(1327) : WARNING : Signed/Unsigned mismatch.
client_interface.fos(1327) : ERROR : No conversion from 'string@&' to 'uint' ava
ilable..
client_interface.fos(1327) : WARNING : Signed/Unsigned mismatch.
client_interface.fos(1327) : ERROR : No conversion from 'string@&' to 'uint' ava
ilable..
client_interface.fos(1327) : WARNING : Signed/Unsigned mismatch.
client_interface.fos(1327) : ERROR : No conversion from 'string@&' to 'uint' ava
ilable..
client_interface.fos(1327) : WARNING : Signed/Unsigned mismatch.
client_interface.fos(1327) : ERROR : No conversion from 'string@&' to 'uint' ava
ilable..
client_interface.fos(1327) : ERROR : No matching signatures to 'array::find(cons
t string&)'.
client_interface.fos(1327) : INFO : Candidates are:.
client_interface.fos(1327) : INFO : int array::find(const uint8&in) const.
client_interface.fos(1327) : INFO : int array::find(uint, const uint8&in) const.

Unable to build.

Less errors, but still, the hell is going on? I swear I was compiling scripts a few months ago with no problems. This happens for all scripts.
« Last Edit: October 23, 2014, 08:18:16 pm by Ethanhoff »

JovankaB

  • Guest
Re: compile_scripts
« Reply #5 on: October 23, 2014, 09:23:11 pm »
Do you use Tortoise or some other SVN client? And did you edit those scripts that show error?

Re: compile_scripts
« Reply #6 on: October 23, 2014, 10:13:30 pm »
Yes, I downloaded the SDK with Tortoise, and I did edit the script, but it shows the same error with the default client_interface.fos as well, and any other script. Is the AScompiler in the repository outdated or something?

JovankaB

  • Guest
Re: compile_scripts
« Reply #7 on: October 23, 2014, 11:11:53 pm »
I think it's the other way around. I suppose you have the latest version of ASCompiler and game executables but the old versions of some of the scripts (because you edited the scripts Tortoise didn't update them). The default client_interface.fos must be old too for some reason, although it's hard to say why without looking into the folder. There were big changes in the SDK in the last year, so you can't use the new compiler with the old versions of the scripts. One way or another you have to update them.

I would just redownload the whole thing to a different, clean folder and see if that works. Then carefully remake the changes you did before. It's not the most sophisticated solution but a simple one (depends how much stuff you changed though).
« Last Edit: October 23, 2014, 11:35:24 pm by JovankaB »

Re: compile_scripts
« Reply #8 on: October 24, 2014, 06:32:04 am »
I did a complete re-update, and it fixed the problem. Thanks for the help! If you were curious, I was trying to install this mod:

http://forum.newfmc.pl/index.php?topic=364.0

Got it to work, but when it's active, any windows opened in the game are invisible. It's also not toggleable, but I'm sure I can find a way to make it that way.
Do you have any ideas about the no-windows thing?
It's also quite jumpy - Is there a way I can make it lock to the player's head like names?
« Last Edit: October 24, 2014, 06:36:11 am by Ethanhoff »

Offline Wipe

  • Rotator
  • Random is god
Re: compile_scripts
« Reply #9 on: October 24, 2014, 02:55:15 pm »
That sounds like you have some error in render_iface(), check FOnline.log

It's also quite jumpy - Is there a way I can make it lock to the player's head like names?
There are two.

First is to add this snippet from cvet to client's .dll.

Second is to update game to SDK r413 which have added function exactly for what you want.
However, r413 contains a bug which makes impossible to use any .dlls on client side. That's fixed later but other bugs jumps in~ I think that madness is gone somewhere around r45x, maybe earlier...

If you're not planning to update to fresh SDK any time in future, i'd go with first solution. Fighting SDK just for the sake of one functionality may be overwhelming even for experienced scripters.
« Last Edit: October 24, 2014, 02:57:04 pm by Wipe »
Games are meant to be created, not played...

Re: compile_scripts
« Reply #10 on: October 24, 2014, 09:45:11 pm »
FOnline.log has 2MB of error and it seems to be repeated, here is a piece:

Code: [Select]
Game>, state<Exception>, call stack<1>:
  0) client_interface : void render_iface(uint) : 1910, 4.
Script exception: Index out of bounds : client_interface : void render_iface(uint) : 1910, 4 : FOClient::DrawIfaceLayer : Game.
Execution of script stopped due to exception.
Context<FOClient::DrawIfaceLayer : Game>, state<Exception>, call stack<1>:

And as for that code from cvet, do I put it into fonline.h around line 1400 or so, where it say

struct CritterCL

?

Offline Wipe

  • Rotator
  • Random is god
Re: compile_scripts
« Reply #11 on: October 25, 2014, 04:35:20 pm »
Hehe yeah, render_iface() is fun to debug. And it looks like w/e you added, it have a problem with some array - trying to access element with index bigger than array length.

As for snippet, yeah, you add it to the end of CritterCl.
Games are meant to be created, not played...

Re: compile_scripts
« Reply #12 on: October 31, 2014, 12:04:30 am »
So, I debugged render_iface(), that's no problem anymore.

Though, I tried adding cvet's snippet into fonline.h, at the end of struct CritterCL, but it doesn't change how the HP over head locks to the hex you step on, not the critter itself.

Here's what I pieced together and put in the end of CritterCL:

Code: [Select]
UShortPairVec MoveSteps;
int           CurMoveStep;

bool needReSet;
uint reSetTick;

void*             Layers3d;

uint curSpr, lastEndSpr;
uint animStartTick;

typedef vector< CritterAnim > CritterAnimVec;
CritterAnimVec animSequence;
CritterAnim    stayAnim;

Animation3d* Anim3d;
Animation3d* Anim3dStay;
bool         Visible;
uchar        Alpha;
Rect         DRect;
bool         SprDrawValid;
Sprite*      SprDraw;
uint         SprId;
short        SprOx, SprOy;
bool         SprDrawValid;
Sprite*      SprDraw;
uint         SprId;
short        SprOx, SprOy;
short        OxExtI, OyExtI;
float        OxExtF, OyExtF;
float        OxExtSpeed, OyExtSpeed;
uint         OffsExtNextTick;
int  staySprDir;
uint staySprTick;
uint finishingTime;
bool fadingEnable;
bool fadeUp;
uint FadingTick;
Rect   textRect;
uint   tickFidget;
string strTextOnHead;
uint   tickStartText;
uint   tickTextDelay;
uint   textOnHeadColor;
short RefCounter;
bool  IsNotValid;

char                  RawData[112];
struct { L, T, R, B } DRect;
bool                  SprDrawValid;
Sprite*               SprDraw;
uint                  SprId;
short                 SprOx, SprOy;
char                  RawData[112];
struct { L, T, R, B } DRect;
bool                  SprDrawValid;
Sprite*               SprDraw;
uint                  SprId;
short                 SprOx, SprOy;
char                  RawData[112];
struct { L, T, R, B } SpriteRect;
bool                  SprDrawValid;
Sprite*               SprDraw;
uint                  SprId;
short                 SprOx, SprOy;
char                  RawData2[44];
struct { L, T, R, B } TextRect;

char                  RawData[112];
struct { L, T, R, B } SpriteRect;
bool                  SprDrawValid;
Sprite*               SprDraw;
uint                  SprId;
short                 SprOx, SprOy;
char                  RawData2[44];
struct { L, T, R, B } TextRect;
struct { L, T, R, B } - struct { int L, T, R, B; }

What did I do wrong? Maybe I need to edit something in the HP display code? I've noticed it has GetHexPos on critters, maybe it's the module itself doing this and needs to be changed. The link to the mod is on one of my posts above.

« Last Edit: October 31, 2014, 12:10:02 am by Ethanhoff »

Offline Wipe

  • Rotator
  • Random is god
Re: compile_scripts
« Reply #13 on: October 31, 2014, 08:40:31 pm »
Adding is one thing, now you need something what get coords [basing on data from expanded CrittterCl] and you're ready to draw them pixels.
Games are meant to be created, not played...

Re: compile_scripts
« Reply #14 on: October 31, 2014, 09:31:49 pm »
Can I have hint on how to grab coords, and add to DrawText function?  ;D
Do I use TextRect somewhere in here?