| 04-23-2007, 07:40 PM | #1 |
This is init part of my trigger and the compiler throws me this error. Twice - the first one is on the line with GetStoredInteger and the second one is on next line. I don't understand it. JASS:function Trig_Creep_dies_Actions takes nothing returns nothing local unit c = GetKillingUnit() local unit u = GetDyingUnit() local player p = GetOwningPlayer(c) local integer kir = GetStoredInteger(udg_gc,I2S(H2I(c)),"kir") local timer t Thanks for help |
| 04-23-2007, 09:31 PM | #2 |
JASS:function U2H takes unit u returns handle return u return 0 endfunction |
| 04-23-2007, 09:41 PM | #3 |
That ain't the problem, Secrets. Units ARE handles, and I2S(H2I(u)) works. |
| 04-23-2007, 09:57 PM | #4 |
just trying to help, have you tryed pjass validation. |
| 04-24-2007, 01:59 PM | #5 |
I tried it and it doesn't work as expected - it throws even more errors than before ("Invalid type for specified operator"). And it doesn't work ingame (it crashes into main menu immidiately). Rep and eternal glory to the one who helps me :) |
| 04-24-2007, 02:14 PM | #6 |
Are you sure that an integer is getting stored into GetStoredInteger, try reinstalling Handle Var system or w/e system you use. Are you sure everything is intialized correctly, Try showing us the entire function. Theoretically, there shouldnt be any problems with your trigger except what might be stored in get stored int, the only problem i can see would be in your custom script, try to reinstall your custom script. Else, try redoing the trigger. |
| 04-24-2007, 02:58 PM | #7 |
You could trying retyping it, removing that line and lines that require the variable using //. Or copy and paste the trigger you posted back into your map overwriting the original one, you can get hidden characters by accident sometimes that causes the parser to find a error but you cant see the character. So retyping is usually a good idea, the trigger you posted might actually have the characters in it though (thats if it even does have a hidden character in it). But its worth a try. |
| 04-24-2007, 03:22 PM | #8 |
I don't think your H2I function is correctly declared |
| 04-24-2007, 03:42 PM | #9 |
LOL, eternal glory to me :P I just tried to rename the variable kir to something else...and it started to work perfectly. I'm stooopid - I have a function named kir just several lines before the code I posted in the first post. I didn't know they collide. Now I know it, after 2 days being stuck. Nice :) Thanks for your time, guys |
| 04-24-2007, 04:18 PM | #10 |
Told ya to check over your code and make sure everything works, lol, hope I can help again later! ![]() |
| 04-24-2007, 04:30 PM | #11 |
Heh, how on earth did you manage to call one of your functions kir? |
| 04-24-2007, 04:30 PM | #12 |
Sorry, but I'm used to PHP. Vars and functions can share same name without problems there. ;) To Pitzer: I was trying to code a skill in 15 minutes before leaving to school. And then I was too lazy to rename it :P |
