Hacktank's Forum
January 27, 2022, 06:38:11 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: New AUTO-backup system
 
  Home   Forum   Help Search Login Register  
Add


Pages: [1]
  Print  
Author Topic: Script-Problem on v1.6.8  (Read 71998 times)
EpyGod
Zombie
*

Reputation: 0
Offline Offline

Posts: 2


View Profile Email
« 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 Smiley

Thanks,
Epy.
Logged
Hacktank
Site/Server Owner
Administrator
Vortex
*

Reputation: 20
Offline Offline

Posts: 117


Demoncoder

jakethedungeonmaster@gmail.com
View Profile WWW Email
« Reply #1 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.
Logged

EpyGod
Zombie
*

Reputation: 0
Offline Offline

Posts: 2


View Profile Email
« Reply #2 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 Smiley
Logged
Hacktank
Site/Server Owner
Administrator
Vortex
*

Reputation: 20
Offline Offline

Posts: 117


Demoncoder

jakethedungeonmaster@gmail.com
View Profile WWW Email
« Reply #3 on: November 21, 2014, 06:51:34 AM »

Well then, the supposed "newest version" link on the forums is far from the newest version.
Logged

aermyne
Zombie
*

Reputation: 0
Offline Offline

Posts: 1


View Profile
« Reply #4 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 Smiley

Thanks,
Epy.

I'm experiencing exactly the same problem right now  Huh
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
Logged
MRavez
Zombie
*

Reputation: 0
Offline Offline

Posts: 1


View Profile Email
« Reply #5 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  Sad

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


Code:
Password: 1234
soldat://91.185.185.87:23073

Thanks.
Logged
Hacktank
Site/Server Owner
Administrator
Vortex
*

Reputation: 20
Offline Offline

Posts: 117


Demoncoder

jakethedungeonmaster@gmail.com
View Profile WWW Email
« Reply #6 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

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));
« Last Edit: January 03, 2015, 04:16:47 PM by Hacktank » Logged

deguix
Zombie
*

Reputation: 0
Offline Offline

Posts: 1


View Profile
« Reply #7 on: June 05, 2015, 11:01:44 AM »

Guess what happened on 1.6.9b1? The IDs got swapped back. Huh

(registered on forums in 2011, my first ever post is in 2015, logic)
« Last Edit: June 05, 2015, 11:03:34 AM by deguix » Logged
Pages: [1]
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 3.018 seconds with 28 queries.
SimplePortal 2.3.3 © 2008-2010, SimplePortal