Hacktank's Forum

Server => Bugs => Topic started by: EpyGod on November 15, 2014, 10:09:46 AM



Title: Script-Problem on v1.6.8
Post by: EpyGod on November 15, 2014, 10:09:46 AM
HI.
The Server Version of Soldat is: (Soldatversion)1.6.8 - (Serverversion)2.7.8
I just tried the ZRPG-Script and i'm getting the error, which you can see in the attached file.

I already tried to understand, why this is happening, but i don't have a clue.

Please help me to fix this thing :)

Thanks,
Epy.


Title: Re: Script-Problem on v1.6.8
Post by: Hacktank on November 16, 2014, 08:46:52 PM
Huh, that is an unfortunate bug. It is being caused by a new server bug where the WeaponNameByNum() function returns erroneous strings if called during script compilation. It returns a blank string for 0 (should be 'USSOCOM'), and USSOCOM for every other input.
Code:
14-11-16 21:31:21 wepname(0):
14-11-16 21:31:21 wepname(1): USSOCOM
14-11-16 21:31:21 wepname(2): USSOCOM
14-11-16 21:31:21 wepname(3): USSOCOM
14-11-16 21:31:21 wepname(4): USSOCOM
14-11-16 21:31:21 wepname(5): USSOCOM
14-11-16 21:31:21 wepname(6): USSOCOM
14-11-16 21:31:21 wepname(7): USSOCOM
14-11-16 21:31:21 wepname(8): USSOCOM
14-11-16 21:31:21 wepname(9): USSOCOM
14-11-16 21:31:21 wepname(10): USSOCOM
14-11-16 21:31:21 wepname(11): USSOCOM
14-11-16 21:31:21 wepname(12): USSOCOM
14-11-16 21:31:21 wepname(13): USSOCOM
14-11-16 21:31:21 wepname(14): USSOCOM
14-11-16 21:31:21 wepname(15): USSOCOM
14-11-16 21:31:21 wepname(16): USSOCOM

The issue came to light in the LoadWeapons() function in my script, and I have fixed it by delaying all set-up and file-loading to the first tick, after compilation has finished.

I updated the file in my post on the official soldat forums, but I will post just the ZRPG.pas file here.


Title: Re: Script-Problem on v1.6.8
Post by: EpyGod on November 17, 2014, 04:21:05 PM
First I tried your fix. But I couldn't get it running(still getting the same error).

On the other Hand I've found a fix, too.

On Line 1942:
replace: weapons[ii-wepstart-1] := StrToInt(data);

with: weapons[ii-wepstart-1] := StrToIntDef(data,0);

I don't know if the result is right, but the script is working for 24h now, without any problems.

So i think this Topic can be closed now.

Thanks for Support :)


Title: Re: Script-Problem on v1.6.8
Post by: Hacktank on November 21, 2014, 06:51:34 AM
Well then, the supposed "newest version" link on the forums is far from the newest version.


Title: Re: Script-Problem on v1.6.8
Post by: aermyne on December 23, 2014, 10:44:15 PM
HI.
The Server Version of Soldat is: (Soldatversion)1.6.8 - (Serverversion)2.7.8
I just tried the ZRPG-Script and i'm getting the error, which you can see in the attached file.

I already tried to understand, why this is happening, but i don't have a clue.

Please help me to fix this thing :)

Thanks,
Epy.

I'm experiencing exactly the same problem right now  ???
Server runs but it lags badly and failing to create an account (scripting set to 1). I've already tried to paste the newest copy of ZRPG.pas onto my server. I've also tried to change 1942 line to that one suggested by EpyGod - it only resulted in stopping ZRPG script at all... I'm so close to getting things done and enjoying this great script but still so far. I believe fixing this issue might fix lags and problem with creating account as well. Thank you for any suggestions Hacktank.

Aermyne


Title: Re: Script-Problem on v1.6.8
Post by: MRavez on January 03, 2015, 11:56:01 AM
HI!

I used a 'patch' of EPY,

On Line 1942:
replace: weapons[ii-wepstart-1] := StrToInt(data);

with: weapons[ii-wepstart-1] := StrToIntDef(data,0);

but I still have a problem with the all Bots. Now have bows,
the second problem is chainsaw. Damage is now 0  :(

Please help. ??? Who wants to invite you to check it on a test server:


Code:
Password: 1234
soldat://91.185.185.87:23073 (http://soldat://91.185.185.87:23073)

Thanks.


Title: Re: Script-Problem on v1.6.8
Post by: Hacktank on January 03, 2015, 02:34:58 PM
Huh. It seems in one of the latest updates to the game, the devs rearranged some of the weapon IDs for some inexplicable reason. Anyway, i have patched the zombies data files to reflect the new weapon IDs. You can download the new version from the forum post here: http://forums.soldat.pl/index.php?topic=41709.0 (http://forums.soldat.pl/index.php?topic=41709.0)

EDIT, ballance changes:

line 911
Code:
result := 200+(500*curlvl)+(curlvl*curlvl*15);

line 3253
Code:
capxp := random(0.3*getlvlxp(player[ID].lvl),0.5*getlvlxp(player[ID].lvl));


Title: Re: Script-Problem on v1.6.8
Post by: deguix on June 05, 2015, 11:01:44 AM
Guess what happened on 1.6.9b1? The IDs got swapped back. ???

(registered on forums in 2011, my first ever post is in 2015, logic)


SimplePortal 2.3.3 © 2008-2010, SimplePortal