From a213549293fc0935ba4b2ac6867c601f7ac43784 Mon Sep 17 00:00:00 2001 From: hubdom <26039831+hubdom@users.noreply.github.com> Date: Tue, 22 Dec 2020 22:00:59 +0100 Subject: [PATCH] SaveLevel: fix bug?! --- SaveLevel/scripting/SaveLevel.sp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/SaveLevel/scripting/SaveLevel.sp b/SaveLevel/scripting/SaveLevel.sp index ba5eec3c..dccd29e6 100644 --- a/SaveLevel/scripting/SaveLevel.sp +++ b/SaveLevel/scripting/SaveLevel.sp @@ -180,17 +180,19 @@ bool RestoreLevel(int client, const char[] sTarget, char[] sName = NULL_STRING, continue; } + Input += Target; sValue[Input] = 0; Input++; // Input (e.g. add) - int Parameter = Input + FindCharInString(sValue[Input], ','); - if(Input == -1) + int Parameter = FindCharInString(sValue[Input], ','); + if(Parameter == -1) { while((Index = FindOutput(client, sValue, 0, sValue[Target], sValue[Input])) != -1) DeleteOutput(client, sValue, Index); continue; } + Parameter += Input; sValue[Parameter] = 0; Parameter++; // Parameter (e.g. 1)