Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: EnEsCe on April 17, 2009, 08:34:16 pm

Title: Known Script Errors and Undocumented Changes {2.8.0}
Post by: EnEsCe on April 17, 2009, 08:34:16 pm
Hey guys, a few things I found wrong with the new script core {2.8.0}

- nil

That's all I know so far, contact me if you find any script related errors.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: LORD KILLA on May 23, 2009, 01:17:51 pm
very often at scripts:
"Access violation"
"Invalid opcode"
"Out of memory"

this sh*t never happend at 1.4.2, but happens at 1.5
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Avarax on June 02, 2009, 04:13:49 pm
MovePlayer still makes a player's weapon drop. This occurs in Hexer and didn't occur with 2.6.4
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: SNAKE[rus] on June 06, 2009, 04:48:10 pm
sry, mb i missed smth in that life but does procedure ForwardClient works in 2.6.5 ?? that procedure seems to be crashed O_o
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Toumaz on June 06, 2009, 05:13:52 pm
sry, mb i missed smth in that life but does procedure ForwardClient works in 2.6.5 ?? that procedure seems to be crashed O_o
Make sure you're using the new syntax:
http://devs.soldat.pl/wiki/index.php/ForwardClient

If you use it correctly and the script compiles and after which you still have problems, make your own topic where you outline the exact issues you might be having with it.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: SNAKE[rus] on June 07, 2009, 10:47:04 am
ups, sorry...i'm just noob ^^ it'sworks greatly  :-[
also... why this procedure needs player IP and Port? server couldnt get it automatically?
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: xmRipper on June 09, 2009, 01:43:56 pm
StartVoteMap function doesn't work.

Quote
21:39:32 › xmRipper: I think StartVoteMap function doesn't work on dedicated 265. Can anyone test it?
21:42:35 › Curt`: agreed
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: DorkeyDear on June 09, 2009, 07:10:20 pm
StartVoteMap function doesn't work.

Quote
21:39:32 › xmRipper: I think StartVoteMap function doesn't work on dedicated 265. Can anyone test it?
21:42:35 › Curt`: agreed
Actually, that wasn't was I was saying agreed to. I was saying I agreed to liking using custom vote systems better because you can get more information out of it. But I just tested this, /votemap nor does the function work. Neither does StartVoteKick, nor /votekick (but I don't even know for certain if that was a built-in command.)
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: EnEsCe on June 09, 2009, 07:48:32 pm
Yeah I already know neither of the vote initiating functions work. Fixed it a couple of weeks ago
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: DorkeyDear on June 11, 2009, 04:04:23 pm
alpha no longer works for WriteConsole?
I tried WriteConsole(0, '  ', $00000000); and I saw it as black!
Also tested wit alpha of 7F.
I require alpha for what im doing :(
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: EnEsCe on June 11, 2009, 05:30:44 pm
Nothing has ever been added to remove alpha from the console, as far as I can remember Alpha had never worked with the console anyway
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: DorkeyDear on June 11, 2009, 07:57:43 pm
Nothing has ever been added to remove alpha from the console, as far as I can remember Alpha had never worked with the console anyway
I think when WriteConsole and stuff was first out, when I tested it, it seemed to work. Or my memory is failing on me.
Could you (with a please) add support for it? :P
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: DorkeyDear on June 11, 2009, 11:42:15 pm
DrawText's 65-character limitation

EDIT: actually often crashes for all players / players who see it (possible due to length?)
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: EnEsCe on June 11, 2009, 11:52:03 pm
Stop posting things that aren't bugs, thanks.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: iDante on June 29, 2009, 04:30:54 pm
Code: [Select]
procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);
begin
if (PrimaryNum <> 255) then
ForceWeapon(ID, 255, 255, 0);
end;
Join, pick a weapon (should change you to hands), then switch to secondary weapon. Ammo goes to 0, animation locks up, can't change weapons, eek!
Rolling/proning fixes it, and it only happens with high numbers (past all the guns).
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Neosano on June 29, 2009, 08:05:29 pm
what about GetPlayerStat(ID,'Ammo') after the ForceWeapon? Is it fixed?
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: LORD KILLA on July 04, 2009, 12:34:54 pm
idk about GetPlayerstat(id, 'Ammo); but Forceweapon() is fixed, yes
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Neosano on July 04, 2009, 04:43:13 pm
idk about GetPlayerstat(id, 'Ammo); but Forceweapon() is fixed, yes
What was the bug?
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: croat1gamer on July 04, 2009, 05:18:53 pm
In server version 2.6.4 it crashed the whole server when used.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Neosano on July 08, 2009, 07:00:55 am
I'm talking about this http://forums.soldat.pl/index.php?topic=28084.0
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Tio R on September 08, 2009, 05:46:23 pm
Code: [Select]
function OnPlayerDamage(Victim, Shooter: Byte; Damage: Integer):Integer;
begin
Result:=0;
end;
This works with deadly polygon, but always cause damage with flamer and hurts polygons.
God mode in climb don't work  :(
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: xmRipper on September 08, 2009, 05:50:12 pm
Code: [Select]
function OnPlayerDamage(Victim, Shooter: Byte; Damage: Integer):Integer;
begin
Result:=0;
end;
This works with deadly polygon, but always cause damage with flamer and hurts polygons.
God mode in climb don't work  :(

Try Result := -Damage;
This may work.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Tio R on September 09, 2009, 04:57:10 pm
Try Result := -Damage;
This may work.
This work, but not perfectly.
For damage from flamer and hurts polygons, the function OnPlayerDamage is called only if the Victim have 0 of health.
Put an "WriteConsole(Victim,intToStr(GetPlayerStat(Victim,'health')) ,$000000)" inside of function OnPlayerDamage and see.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Polifen on November 23, 2009, 09:03:21 am
Use result := -9999999 and it will work for sure ( testet on my server ).
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Neosano on November 23, 2009, 02:38:40 pm
Using result := -9999999 is fecking useless and stupid.
Integer: -32768 to 32767
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: EnEsCe on November 24, 2009, 12:06:56 am
What? Integer is 4 bytes, -2147483648 to 2147483647......  -32768 to 32767 is a 2 byte SmallInt, which is not used in the core.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: zop on November 24, 2009, 08:27:04 am
Is this fixed in 2.7.0 too? As I know the m79 problem was fixed in 2.7.0.
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Neosano on November 26, 2009, 02:43:42 pm
Strange. Didn't know that it's not like in pascal...
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: jrgp on November 26, 2009, 03:03:41 pm
Strange. Didn't know that it's not like in pascal...

It technically isn't even pascal...it's a weird perversion of Delphi, which in itself is a weird perversion of Object Pascal.

It's a few generations younger :P
Title: Re: Known Script Errors and Undocumented Changes {2.6.5}
Post by: Quantifier on November 27, 2009, 02:18:16 am
It technically isn't even pascal...it's a weird perversion of Delphi, which in itself is a weird perversion of Object Pascal.

Technically it is a subset of Object Pascal, not Delphi.