if(usr.pl >=150000 &&usr.ssj == 0)
Problem description:
When i compile this it says "expected a constant expression" and i dont understand it.
ID:145054
![]() Jun 25 2006, 12:40 pm (Edited on Jun 25 2006, 1:02 pm)
|
|
Code:
if(usr.pl >=150000 &&usr.ssj == 0)
Problem description: When i compile this it says "expected a constant expression" and i dont understand it. |
![]() Jun 25 2006, 1:51 pm
|
|
What's the code around that? You probably put that in a spot that's meant for compile-time information instead of runtime. That needs to go inside a function.
|
this is my game key and i dont feel like logging out but this is the whole code---
obj/saiyajin ssj verb Revert() set category = "Fighting" set name = "Revert" if(usr.ssj == 0) usr << "You arent in SSJ." if(usr.ssj == 1) usr << "You begin to calm down...." usr.ssj = 0 usr.underlays -= 'raura.dmi' if(usr.hair == "Spikey") usr.overlays -= 'Black_Spikey_SSJ.dmi' var/icon/I = new('Black_Spikey.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "Short") usr.overlays -= 'Short_SSJ.dmi' var/icon/I = new('Black_Short.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "Long") usr.overlays -= 'Black_Spikey_SSJ.dmi' var/icon/I = new('Black_Long.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "Goku") usr.overlays -= 'HSGoku.dmi' var/icon/I = new('HGoku.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "Vegeta") usr.overlays -= 'HSVegeta.dmi' var/icon/I = new('HVegeta.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "GTVegeta") usr.overlays -= 'GTVegetaSSJ.dmi' var/icon/I = new('GTVegeta.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "Trunks") usr.overlays -= 'HSTrunks.dmi' var/icon/I = new('HTrunks.dmi') I.Blend(usr.hcolor) usr.overlays += I if(usr.hair == "Future Trunks") usr.overlays -= 'HSFutureTrunks.dmi' var/icon/I = new('HFutureTrunks.dmi') I.Blend(usr.hcolor) usr.overlays += I usr.atk=usr.patk usr.def=usr.pdef usr.Move_Delay = 4 usr.patk=0 usr.pdef=0 usr.overlays -= 'elec.dmi' usr.overlays -= 'elec3.dmi' usr.overlays -= 'elec2.dmi' usr.overlays -= 'elec3.dmi' usr.overlays -= 'gossj5.dmi' usr.overlays -='ssj3.dmi' usr.overlays -= 'ssj4.dmi' usr.overlays -= '2ssj4.dmi' usr.overlays -= 'Vssj4.dmi' usr.overlays -= 'HS4Goku.dmi' usr.overlays -= 'ussj.dmi' usr.overlays -= 'HSSJ4.dmi' usr.underlays -= image('raura.dmi',icon_state ="trans") if(usr.pl > usr.maxpl) usr.pl = usr.maxpl usr.state = "Normal" usr.atk = round(usr.atk) usr.def = round(usr.def) Transform() set category = "Fighting" set name = "Transform" if(usr.ssj == 1) usr << "You are in SSJ already." else if(usr.ssj == 0 && usr.kaioken == 0 && usr.race == "Saiya-jin") switch(input("What type of Super Saiyan do you wish to go?") in list("Super Saiyan","Super Saiyan 2","Super Saiyan 3","Super Saiyan 4")) if("Super Saiyan") if(usr.pl >=100000 &&usr.ssj == 0) usr.patk = usr.atk usr.state = "Super Saiyan" usr.pdef = usr.def usr.Move_Delay = 3 usr.atk = usr.atk * 2 usr.def = usr.def * 2 usr.underlays += 'raura.dmi' //usr.oicon=usr.icon usr << "You transform into the first grade of a super saiyan." flick("transform", usr) new/obj/techs/Overlays/Crater_Center(src.loc) oview(6) << "<font color = red>Info:<font color = blue>[usr]'s body glows a wild gold, as his hair spikes up." if(usr.hair == "Spikey") usr.overlays += 'Black_Spikey_SSJ.dmi' var/icon/I = new('Black_Spikey.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Long") usr.overlays += 'Black_Spikey_SSJ.dmi' var/icon/I = new('Black_Long.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Short") usr.overlays += 'Short_SSJ.dmi' var/icon/I = new('Black_Short.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Goku") usr.overlays += 'HSGoku.dmi' var/icon/I = new('HGoku.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Vegeta") usr.overlays += 'HSVegeta.dmi' var/icon/I = new('HVegeta.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "GTVegeta") usr.overlays += 'GTVegetaSSJ.dmi' var/icon/I = new('GTVegeta.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Trunks") usr.overlays += 'HSTrunks.dmi' var/icon/I = new('HTrunks.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Future Trunks") usr.overlays += 'HSFutureTrunks.dmi' var/icon/I = new('HFutureTrunks.dmi') I.Blend(usr.hcolor) usr.overlays -= I usr.ssj = 1 usr.state = "Super Saiya-jin" usr.pl = (usr.pl *2) usr.pl = round(usr.pl) else usr << "You feel too weak to go Super Saiyan." if(usr.pl >=150000 &&usr.ssj == 0) usr.patk = usr.atk usr.state = "Super Saiyan" usr.pdef = usr.def usr.Move_Delay = 4.5 usr.atk = usr.atk * 2.5 usr.def = usr.def * 2.5 usr.underlays += 'raura.dmi' //usr.oicon=usr.icon usr << "You transform into the second grade of super saiyan (Ultra)." flick("transform", usr) new/obj/techs/Overlays/Crater_Center(src.loc) oview(6) << "<font color = red>Info:<font color = blue>[usr]'s body glows a wild gold, as his hair spikes up." if(usr.hair == "Spikey") usr.overlays += 'Black_Spikey_SSJ.dmi' var/icon/I = new('Black_Spikey.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Long") usr.overlays += 'Black_Spikey_SSJ.dmi' var/icon/I = new('Black_Long.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Short") usr.overlays += 'Short_SSJ.dmi' var/icon/I = new('Black_Short.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Goku") usr.overlays += 'HSGoku.dmi' var/icon/I = new('HGoku.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Vegeta") usr.overlays += 'HSVegeta.dmi' var/icon/I = new('HVegeta.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "GTVegeta") usr.overlays += 'GTVegetaSSJ.dmi' var/icon/I = new('GTVegeta.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Trunks") usr.overlays += 'HSTrunks.dmi' var/icon/I = new('HTrunks.dmi') I.Blend(usr.hcolor) usr.overlays -= I if(usr.hair == "Future Trunks") usr.overlays += 'HSFutureTrunks.dmi' var/icon/I = new('HFutureTrunks.dmi') I.Blend(usr.hcolor) usr.overlays -= I usr.ssj = 1 usr.state = "Super Saiya-jin" usr.pl = (usr.pl *3.5) usr.pl = round(usr.pl) else usr << "You feel too weak to go super saiyan." some indentaions arent right cause of this box(i think) but idk wat to do from here, i am usually good with these kinds of things but it happened once before and i dont remember what i did to fix it |
XzDoG wrote:
Stop ripping zeta. Your asking to much of them XzDog the only thing they know how to do is rip games and mess up the code then ask US the people who actually CODE stuff for help. They are pathectic in my opinion i hate them so much DEATH TO DBZ!!!!! |
It appears to be because it is inside a switch statement. That section is probably indented either one tab too far or one too few.
|
DBZ is awesome. =D
DBZeta, however, is not. And may I suggest optimization for that code? Geeze, what an eyesore. A bunch of checks for nothing. |
well no thanks to the rest of you critics i figured it out and on my own,and no this isnt a zeta rip either,and i can code but my comp was running slow that day and i was frustrated very easily and i was too hot headed to see that the whole thing had an indentation error back at the revert code. Now if you dont mind can i askone more question with out being critizied? When i try to load my login screen as a turf it comes up as bad file.
turf LOGINSCREEN icon = "AS2screen.bmp" then i compile... Aftersight 2.dme:48:error: "AS2screen.bmp": bad file |
Yes he did but I did figure it out by myself because i had completly forgotten that i posted this until i had another problem. So i never look here until now. Now stop being a smart ass and shut it.
|
0_o ...o and for your information this aint a zeta rip i asked that question for my friends game(KalibreX, his game sage empire which is clandbgt2 hacked version) so thats a rip not AS2,..we baerly have anything done on it,all u can do is login ,chose a race,and walk around...
|
Use ''s instead.
And please start using the DM tags. They make your code easier to read and show any HTML tags you may be using, as well as seperating it out from the rest of your post. |