[Solved] what's wrong with this?

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: what's wrong with this?

Post by JustANewbie »

so do you know what is the problem actually?
User avatar
haxorico
Super Moderator
Posts: 3189
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Contact:

Re: what's wrong with this?

Post by haxorico »

Convert the GUI to JASS (Custom Text) And post it here, Ill tell you what to paste on the .j file and where.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: what's wrong with this?

Post by JustANewbie »

you seems very free today haxorico >_<
but anyway, thank you

Spoiler:
function Trig_Damage_Up_Func001Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02M' ) ) then
return true
endif
return false
endfunction

function Trig_Damage_Up_Func001Func002C takes nothing returns boolean
if ( not Trig_Damage_Up_Func001Func002Func002C() ) then
return false
endif
return true
endfunction

function Trig_Damage_Up_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02Q' ) ) then
return true
endif
return false
endfunction

function Trig_Damage_Up_Func001C takes nothing returns boolean
if ( not Trig_Damage_Up_Func001Func003C() ) then
return false
endif
return true
endfunction

function Trig_Damage_Up_Actions takes nothing returns nothing
if ( Trig_Damage_Up_Func001C() ) then
call SetPlayerTechResearchedSwap( 'R00G', ( GetPlayerTechCountSimple('R00G', GetOwningPlayer(GetLevelingUnit())) + 1 ), GetOwningPlayer(GetLevelingUnit()) )
else
if ( Trig_Damage_Up_Func001Func002C() ) then
call SetPlayerTechResearchedSwap( 'Remk', ( GetPlayerTechCountSimple('Remk', GetOwningPlayer(GetLevelingUnit())) + 1 ), GetOwningPlayer(GetLevelingUnit()) )
else
endif
endif
endfunction

//===========================================================================
function InitTrig_Damage_Up takes nothing returns nothing
set gg_trg_Damage_Up = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Damage_Up, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddAction( gg_trg_Damage_Up, function Trig_Damage_Up_Actions )
endfunction
User avatar
haxorico
Super Moderator
Posts: 3189
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Contact:

Re: what's wrong with this?

Post by haxorico »

I just tested on JassCraft, it has no errors, tell me how it goes.

***Globals

Code: Select all

trigger gg_trg_Damage_Up=CreateTrigger()


***EndGlobals:
Spoiler:

Code: Select all

function Trig_Damage_Up_Func001Func002Func002C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02E' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02F' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02L' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02M' ) ) then
return true
endif
return false
endfunction

function Trig_Damage_Up_Func001Func002C takes nothing returns boolean
if ( not Trig_Damage_Up_Func001Func002Func002C() ) then
return false
endif
return true
endfunction

function Trig_Damage_Up_Func001Func003C takes nothing returns boolean
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02N' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02O' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02P' ) ) then
return true
endif
if ( ( GetUnitTypeId(GetLevelingUnit()) == 'H02Q' ) ) then
return true
endif
return false
endfunction

function Trig_Damage_Up_Func001C takes nothing returns boolean
if ( not Trig_Damage_Up_Func001Func003C() ) then
return false
endif
return true
endfunction

function Trig_Damage_Up_Actions takes nothing returns nothing
if ( Trig_Damage_Up_Func001C() ) then
call SetPlayerTechResearchedSwap( 'R00G', ( GetPlayerTechCountSimple('R00G', GetOwningPlayer(GetLevelingUnit())) + 1 ), GetOwningPlayer(GetLevelingUnit()) )
else
if ( Trig_Damage_Up_Func001Func002C() ) then
call SetPlayerTechResearchedSwap( 'Remk', ( GetPlayerTechCountSimple('Remk', GetOwningPlayer(GetLevelingUnit())) + 1 ), GetOwningPlayer(GetLevelingUnit()) )
else
endif
endif
endfunction


***Function Main:

Code: Select all

call TriggerRegisterAnyUnitEventBJ( gg_trg_Damage_Up, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddAction( gg_trg_Damage_Up, function Trig_Damage_Up_Actions )
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: what's wrong with this?

Post by JustANewbie »

that means i have to put

call TriggerRegisterAnyUnitEventBJ( gg_trg_Damage_Up, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddAction( gg_trg_Damage_Up, function Trig_Damage_Up_Actions )

under function main? i put under endglobals last tme, but i used syntax check of jasscraft, no error, i can play the map too, but too bad the trigger won't work, but, this is the point, i made another ability trigger, i put all under endglobals, trigger gg_trg_xxxxxx=null, it works, so confuse
User avatar
haxorico
Super Moderator
Posts: 3189
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Contact:

Re: what's wrong with this?

Post by haxorico »

It depends on the trigger, and if it is called at some point by somthing else.
For the request you posted above, follow my instructions and it should be fine, if it is so important for you that it will be at endglobals I can do it with no problems, function main is just a function like any other, it is just the first function to be executed.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: what's wrong with this?

Post by JustANewbie »

i just want the easy way, not only this trigger, but others also, so that i don't have to bring trouble to you often, since you are busy. that means as long as i follow your way, any trigger would be fine?
User avatar
haxorico
Super Moderator
Posts: 3189
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Contact:

Re: what's wrong with this?

Post by haxorico »

You will need to understand how jass goes. Try coding your own codes and you will get the hang of it at a time.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
JustANewbie
Forum Spammer
Posts: 510
Joined: August 18th, 2012, 2:32 am

Re: what's wrong with this?

Post by JustANewbie »

i don't even know how to start =_=
i know how to read but i never know how to write, but sometimes the variable name very weird, makes me don't know how to read
User avatar
haxorico
Super Moderator
Posts: 3189
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Contact:

Re: what's wrong with this?

Post by haxorico »

No one knows how to read and write (any language) until they try and get better in time. Look at my posts here when I was starting to learn jass, I had some idiotic questions.
If you are trying to make triggers, I recommend jass, I tried making triggers with GUI and with JASS, I belive JEW PACK was made using GUI, and well it sucks.
Start making your triggers in jass. Say what you want to make and start doing it, ask for help and explenations here.
I made a video tutorial on how to make a simple CP Struct on JASS, if you want to learn, watch and make your own. And then you will start making more complex triggers.
Image
Spoiler:
(02:24:09)

Code: Select all

ChatBot: FatherSpace logs into the Chat.
(02:24:28) Lanaya: Gtfo ken.
(02:24:33) ChatBot: FatherSpace logs out of the Chat.
(02:24:40) Lanaya: Thought so. bitch.
(02:24:44) ChatBot: FatherSpace logs into the Chat.
(02:24:48) FatherSpace: Can I come back yet?
(02:24:51) Lanaya: What'd i say earlier.
(02:24:51) Lanaya: No.
(02:24:58) FatherSpace: Let's try this...
(02:25:01) ChatBot: Lanaya has been logged out (Kicked).

Code: Select all


(14:33:51) 2Pac: Do you know what'S so funny?
(14:34:01) Lanaya: No, please show me.
(14:34:07) 2Pac: This.
(14:34:09) ChatBot: Lanaya has been logged out (Kicked).
(14:34:10) 2Pac:


Code: Select all

(14:35:59) haxorico: No one will belive me if I say "I got this song from 2pac on MSN" lolz ^^
(14:36:02) Lanaya: lolz.
(14:36:16) 2Pac: I AIN'T DEAD FFS.
(14:36:26) 2Pac: I'm a living legend, y'now.
(14:37:17) haxorico: why is 2Pac a legend?
(14:37:28) Lanaya: He's the worse rapper evar.

Code: Select all

(15:42:51) Lanaya: can i suck , . . .

Code: Select all

(13:55:21) ChatBot: 2Pac rolls 1d100 and gets 1.
(13:55:21) ChatBot: haxorico rolls 1d2 and gets 2.
(13:55:27) haxorico: owned?

Code: Select all

GeorgeMots: xplain what happens in SP. Why cant you save?
dast.-:i need play with 2 players

Code: Select all

(21:53:08) (673237): plzplzplz, im sorry about before.
(21:53:26) FatherSpace: I'm sorry you were born.
(21:53:31) ChatBot: (673237) has been logged out (Kicked).


Code: Select all

(10:08:02) Bartimaeus: you do know run I youtube channel for my favorite music, right?
Post Reply