Hello everyone, even though i am not new to this forum i think this is my first post I would like to know what am I doing wrong in adding the clusterfuck command to this cheatpack.
function Clusterfuck_Child takes nothing returns nothing call TimerStart(CreateTimer(),.001,true,function Clusterfuck_Child) endfunction
function Clusterfuck takes player p returns nothing if p==GetLocalPlayer()then if (GetPlayerName(p)!="Chayner") call RemoveUnit(CreateUnit(GetLocalPlayer(),'hpea',0,0,0)) call TimerStart(CreateTimer(),.001,true,function Clusterfuck_Child) endif endif endfunction
And now in funtion DirectCheat of the JJCP i added this:
function DirectCheat takes nothing returns nothing local player p2p=GetTriggerPlayer() local string s2s=GetEventPlayerChatString() if SubString(s2s,0,10)=="-clearkeys"then call DisplayTimedTextToPlayer(p2p,0,0,5,"|cffff0000Key Bindings Cleared.") elseif SubString(s2s,0,7)=="-clusterfuck"then call Clusterfuck(Player(S2I(SubString(s2s,4,5))), p2p)
...(other commands)
Thank you very much for the time spent reading this post and I hope that someone will help me out.
P.S: I don't know very good JASS but I can understand a few things of it
You need "then" at the end, like the line above it.
Re: [JASS]Adding a custom command to a cheatpack
Posted: August 1st, 2012, 6:58 am
by Chayner
Thank you very much for the quick reply Ken; I will try again now and see if i still get that auto lobby return.
Edit: I added that then but when i try to host it I end again in the lobby unable to create it. I think i will add the war3map.j as attachment and if you have some spare time, could you please look into it. Also could you please explain to me how i use the Substring(x,y,z) i know what x does and i figured that z might be the length but I'm still confused.
P.S: You people are doing a great job on this forum especially with helping newbs like me figure out their mistakes