Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Fryer on February 08, 2016, 12:21:57 pm

Title: AimMode - Aim practise gamemode script
Post by: Fryer on February 08, 2016, 12:21:57 pm
Script Name: AimMode.
Author: Fryer.
Core Version: 2.8.0 (Soldat 1.7.0), using SC3.
Description: A scripted 1on1 gamemode for aim practise. Map included in download.

Installation:

Features:

Bugs and issues:
Title: Re: AimMode - Aim practise gamemode script
Post by: Fryer on February 09, 2016, 01:14:21 pm
Update: Fixed some file clutter, no changes in the script.
Title: Re: AimMode - Aim practise gamemode script
Post by: CCalp on February 09, 2016, 03:56:58 pm
Thank you! Is there any server running the script yet?
Title: Re: AimMode - Aim practise gamemode script
Post by: Fryer on February 09, 2016, 05:33:36 pm
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.

EDIT: I'm no longer hosting a server for AimMode.
Title: Re: AimMode - Aim practise gamemode script
Post by: Savage on February 12, 2016, 08:36:12 am
Line: 32
Code: [Select]
procedure SpawnNades();
var
    SpawnedAt: Array[1..255] of Boolean;
begin
    for I := 1 to 255 do begin
        SpawnedAt[I] := False;
    end;
end;

As far as I know local variable is freed from memory when procedure ends so it should has default value each time procedure is called.
Title: Re: AimMode - Aim practise gamemode script
Post by: Fryer on February 12, 2016, 01:19:16 pm
Line: 32
Code: [Select]
procedure SpawnNades();
var
    SpawnedAt: Array[1..255] of Boolean;
begin
    for I := 1 to 255 do begin
        SpawnedAt[I] := False;
    end;
end;

As far as I know local variable is freed from memory when procedure ends so it should has default value each time procedure is called.

https://github.com/remobjects/pascalscript/blob/master/Source/uPSRuntime.pas#L1764 agrees, updated.
Title: Re: AimMode - Aim practise gamemode script
Post by: urraka on February 12, 2016, 04:30:01 pm
Are you sure InitializeVariant is called for local variables though? Local variables aren't initialized with default values, usually (they are left off with garbage). Maybe they are initialized on this particular pascalscript implementation, but if it's not documented to behave like that it's probably not a safe assumption to make.

Free Pascal documentation says:

Quote
By default, variables in Pascal are not initialized after their declaration. Any assumption that they contain 0 or any other default value is erroneous: They can contain rubbish.

http://www.freepascal.org/docs-html/ref/refse23.html
Title: Re: AimMode - Aim practise gamemode script
Post by: Falcon` on February 13, 2016, 05:51:04 am
Every variable in PascalScript is initialized, both global and local, even inside of records. I even think it has some simple GC in case you forgot to free TNewPlayer or sth.
Title: Re: AimMode - Aim practise gamemode script
Post by: machina on April 19, 2016, 07:22:30 am
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
This server doesn't seem to work anymore.
Title: Re: AimMode - Aim practise gamemode script
Post by: Fryer on April 19, 2016, 01:07:34 pm
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
This server doesn't seem to work anymore.
Indeed, I stopped hosting it. Post edited.
Title: Re: AimMode - Aim practise gamemode script
Post by: soldat-game on April 19, 2016, 01:25:26 pm
And no one in this not played, so there was no chance even test.
Title: Re: AimMode - Aim practise gamemode script
Post by: Fryer on April 20, 2016, 12:28:10 pm
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Title: Re: AimMode - Aim practise gamemode script
Post by: %%%%%%% on April 20, 2016, 11:09:47 pm
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Can you at least make an attempt at understanding his English before you condescend? Please?

My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
Title: Re: AimMode - Aim practise gamemode script
Post by: Fryer on April 21, 2016, 05:06:31 am
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
I've tested the script together with a few other players enough to weed out most common problems. If anyone feels like more testing is needed they're free to download and run the script on their own server. Things I haven't tested include running the server on linux and using different maps/settings than the recommended ones, so trying out that would probably be more productive in terms of testing than me keeping the same server up and having one player join and leave once every few days.
Title: Re: AimMode - Aim practise gamemode script
Post by: soldat-game on April 21, 2016, 10:12:16 am
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Can you at least make an attempt at understanding his English before you condescend? Please?

My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.

Because of his polish nickname is a frajer.
Title: Re: AimMode - Aim practise gamemode script
Post by: %%%%%%% on April 21, 2016, 12:52:29 pm
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
I've tested the script together with a few other players enough to weed out most common problems. If anyone feels like more testing is needed they're free to download and run the script on their own server. Things I haven't tested include running the server on linux and using different maps/settings than the recommended ones, so trying out that would probably be more productive in terms of testing than me keeping the same server up and having one player join and leave once every few days.
Fair enough, thanks for expounding; mind you, I wasn't criticizing you for taking your server down -- that's your prerogative and you have every right.

Because of his polish nickname is a frajer.
If you have nothing of value to say, don't say anything.