(Jass) Code Not Working

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

rasas
Newcomer
Posts: 15
Joined: February 18th, 2008, 6:25 pm

(Jass) Code Not Working

Post by rasas »

Can anyone help me fix my code? This code is basically to edit or change the terrain in game.
Also I'm trying to add this code to a map with a cheat pack if that will make much of a differnce
Spoiler:
if(GetEventPlayerChatString()=="-crops")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Vcrp',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-vines")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Cvin',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-vines2")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Avin',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-poison")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Cpos',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-pebbles")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Bdrr',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-cobble")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Qcbp',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-leaves")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Alvd',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-leaves2")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Clvg',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-dirt")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Ldrt',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-dirt2")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Fdro',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-dirt3")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Cdrt',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-dirt4")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Xdrt',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-snow")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Isnw',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-snow2")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Nsnr',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-snow3")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Nsnw',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-ice")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Iice',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-ice2")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Idki',-1,0x3B9ACA00,1)
elseif(GetEventPlayerChatString()=="-ice3")
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),'Nice',-1,0x3B9ACA00,1)
endif
User avatar
haxorico
Super Moderator
Posts: 3198
Joined: February 24th, 2009, 1:31 pm
Location: JEW LAND
Been thanked: 1 time

Re: (Jass) Code Not Working

Post by haxorico »

is there a trigger for this function?
does another function call it?
or did you insert that in the function with all the commands?
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?
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: (Jass) Code Not Working

Post by Ken »

Fun fact, JJCP includes a command that does similar to this.

-ground ####

Replace #### with the rawcode for the terrain, and everything will be it. And hopefully, that's what you want.

You can look in JJCP to see how he's done it, but I suspect that as haxorico said, you didn't create a trigger for this, or some general JASS error.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
rasas
Newcomer
Posts: 15
Joined: February 18th, 2008, 6:25 pm

Re: (Jass) Code Not Working

Post by rasas »

Yes, I did insert the function incorrectly..... and thanks fatherspace I didn't know it jjcp had it so I'll insert that.