Where is mistake in the my code?

Users who are viewing this thread

Code:
 ("ze_treasure", spr_use_time(2), "chest_b", "bo_ze_treasure", [
    (ti_on_scene_prop_use,
[

 (store_script_param, ":player_no", 1),

     (store_trigger_param_1, ":var0"),
      (store_trigger_param_2, ":var1"),
      (prop_instance_get_variation_id_2, ":var2", ":var1"),
      (agent_is_active, ":var0"),
      (agent_is_alive, ":var0"),

(player_get_unique_id, ":player_unique_id", ":player_no"),

 (try_begin),

 (eq, ":var2", 3),
 (eq, ":player_unique_id", 656345),
 (my code without mistakes next)

    (try_end),
      (else_try),
    (try_end),

This is not working. Compiler not gives errors. But In-Game this just not working when I'm using ze treasure.

Without this my code working:
Code:
(player_get_unique_id, ":player_unique_id", ":player_no"),
 (eq, ":player_unique_id", 656345), 

But when I'm added this, its not work. Compiler not gives errors. But In-Game this just not working when I'm using ze treasure. Just nothing happens.


 
That causes your problem:
Code:
(store_script_param, ":player_no", 1),

"ti_on_scene_prop_use" is TRIGGER not SCRIPT.  You already got its parameters. It doesnt have any parameter that outputs player. You got agent id, use "agent_get_player_id" to extract player.
 
And how to do "eq" with this?

Code:
       (agent_get_player_id, ":player_id", ":player_id"),

        (eq, ":var2", 3),
	(eq, ":player_id", 656345),

Compiling but not working.
 
Cray-Z said:
And how to do "eq" with this?

Code:
       (agent_get_player_id, ":player_id", ":player_id"),

        (eq, ":var2", 3),
   (eq, ":player_id", 656345),

Compiling but not working.
You Wouldn't wanna store the agent_id in a variable called "Player_id" its gonna end up confusing you. Name  it agent_id. Im not sure if that might be causing some error but i wouldn't be suprised. Maybe store the "656345" inside a variable before running the eq check and do something like (eq, ":my_pid", ":player_id"),
 
Code:
(agent_get_player_id, ":player_id", ":player_id"),
:shock:
Did you even checked in header_operations what parameters that operation uses?
 
Back
Top Bottom