- Joined
- Oct 10, 2017
- Messages
- 32
So, I'm new to Jass, read quite a few tutorials and feel pretty sure about the basics so far. With my current knowledge, I'm trying to create a camera trigger. That trigger is supposed to zoom out the camera of the player (should work for every player) if they type in "-+500" (without the "").
This is my code so far and it gives me lots of compiler (Syntax) errors.
This is my code so far and it gives me lots of compiler (Syntax) errors.
Code:
function CameraSetting takes nothing returns nothing
local integer p = 0
loop
exitwhen p == 12
call TriggerRegisterPlayerChatEvent (CameraInit, Player(p), "+500", true)
set p = p + 1
endloop
endfunction
function Init_Trg_CameraInit takes nothing returns nothing
set gg_trg_InitTrig_CameraInit = CreateTrigger()
call TriggerAddAction(Init_Trg_CameraInit,CameraSetting)
endfunction