0 Members and 1 Guest are viewing this topic.
► [*] [Error] Nextmap -> (OnPlayerSpeak): Invalid Type► [*] [Error] Nextmap -> (AppOnIdle): Access violation at address 00453BD7 in module 'soldatserver.exe'. Read of address 00000106► c 15:59:00 [*] Too many script errors! Shutting down server -> "Nextmap"
procedure OnPlayerSpeak(ID: byte; Text: string);var i, Total: byte;begin if ((LowerCase(Text) = '!nextmap') and (Enable)) then begin if Voted[ID] then WriteConsole(ID, 'You have already voted.', Color) else if (Time = 0) then Time := InitTime else Time := Time + Addtime; Voted[ID] := true; for i := 1 to 32 do if (GetPlayerStat(i, 'Active') = true) and (Voted[i]) then Total := Total + 1; if (100 * Total / (NumPlayers - NumBots) >= VotePerc) then begin for i := 1 to 32 do Voted[ID] := false; DisableVoteNext; WriteConsole(0, 'Nextmap vote passed', Color); Command('/nextmap'); end else WriteConsole(0,FloattoStr(RoundTo(100 * Total / (NumPlayers - NumBots), 2)) + '% / ' + InttoStr(VotePerc) + '% required for a vote pass', Color); end;//modified script if regExpMatch('^/(commands|shop|spawn|help|vest|clust|serk|flame|stat)$', Text) then begin writeconsole(ID, 'Press the command button [/]', Color); writeconsole(ID, 'You cannot enter command with the chat button [default T]', Color); end; if regExpMatch('^!(commands|shop|spawn|help|vest|clust|serk|flame|stat)$', Text) then begin writeconsole(ID, 'Press the command button [/]', Color); writeconsole(ID, 'You cannot enter command with the chat button [default T]', Color); end;end;