- Joined
- Dec 11, 2014
- Messages
- 2,004
Didn't know whether to post in T&S, or WEHZ, but I chose this one. If there's a problem, a mod can move it 
-----------------------------
My first try on JASS is a system, a String Detection System (SDS).
I want to use it with my Custom Chat System (CCS) so that I can detect offensive language and change it with "*".
Now:
Id like to say the system itself.
Now here the problem comes:
When I used this for testing this, things worked fine, but everything after this Function call are not executed. Its like an empty return! Whats the problem?
-Sorry if there is offensive language.
Now everything is fine, but the Text 1, 13, 16 isnt shown and THERE STILL IS FOG OF WAR. AND THE TEXT BEFORE FUNCTION CALL IS SHOWN.
Halp?
-----------------------------
My first try on JASS is a system, a String Detection System (SDS).
I want to use it with my Custom Chat System (CCS) so that I can detect offensive language and change it with "*".
Now:
Id like to say the system itself.
JASS:
function SDS takes string s, string phrase returns nothing
local integer i = 1
local integer textlength = StringLength(s)
local integer phraselength = StringLength(phrase)
local string temps
loop
exitwhen i > phraselength
set temps = SubString(phrase, i, i + textlength - 1)
if temps == s then
set udg_SDS_Num = udg_SDS_Num + 1
set udg_SDS_1[udg_SDS_Num] = i
set udg_SDS_2[udg_SDS_Num] = i + textlength - 1
endif
endloop
set temps = null
endfunction
My system is in map script.
JNGP doesn't throw any errors.
I love it.
Now here the problem comes:
When I used this for testing this, things worked fine, but everything after this Function call are not executed. Its like an empty return! Whats the problem?
-
Init Start Settings
-
Events
-
Time - Elapsed game time is 1.00 seconds
-
-
Conditions
-
Actions
-
Trigger - Turn on Camera lock <gen>
-
Trigger - Turn on Clicking <gen>
-
Game - Display to (All players) the text: Type "-Music Normal...
-
Custom script: call SDS("fuck", "i need some fucking beer!")
-
For each (Integer Test_Integer) from 1 to SDS_Num, do (Actions)
-
Loop - Actions
-
Game - Display to (All players) the text: (String(SDS_Num))
-
Game - Display to (All players) the text: (String(SDS_1[Test_Integer]))
-
Game - Display to (All players) the text: (String(SDS_2[Test_Integer]))
-
-
-
For each (Integer A) from 1 to 8, do (Actions)
-
Loop - Actions
-
Visibility - Create an initially Enabled visibility modifier for Player[(Integer A)] emitting Visibility across (Playable map area)
-
-
-
Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
Now everything is fine, but the Text 1, 13, 16 isnt shown and THERE STILL IS FOG OF WAR. AND THE TEXT BEFORE FUNCTION CALL IS SHOWN.
Halp?