compare strings

Users who are viewing this thread

EmielRegis

Sergeant Knight at Arms
Hello. I trying to make my own chat commands but I have one problem. I dont know how to compare strings in module system. Normal "eq" not working at all probably its used only for numerical values. Anyone know how to do this?

Code:
("wse_chat_message_received", [
	(store_script_param, ":player_no", 1),
	(store_script_param, ":chat_type", 2),
	(try_begin),
		(display_message, "@before"),
		(display_message, s0),
		(str_store_string, s1, "@/yo"),
		(eq, s0, s1),
		(display_message, "@after"),
		(multiplayer_send_string_to_player, ":player_no", multiplayer_event_show_server_message, "@abc"),	
	(try_end),
	]),
 
There's a specific WSE operation to do so.
Code:
(str_equals, <string_1>, <string_2>, [<case_insensitive>]), #Fails if <string_1> is not equal to <string_2>
Checking out the header_operations file is allways worth it!
 
Back
Top Bottom