| 07-22-2005, 12:44 PM | #1 |
These are the custom script functions i have: function GetStoredIntString takes handle h, string s returns integer return GetStoredInteger(Cache(),I2S(Handler( h )), s) endfunction function StoreIntString takes handle h, string s, integer x returns nothing call StoreInteger(Cache(),I2S(Handler( h )), s, x) endfunction and this is what i want to do: this is a function called "Test", i deleted the rest of the triggers cuz i only need help with this line. im trying to get an integer using those functions.. but i keep getting an "Expected a name" error: call UnitDamageTarget(gg_unit_E00L_0043, t, GetStoredIntString(gg_trg_Test, "damage"), false, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS) t is already defined as a unit i is defined as a certain integer i already defined gg_trg_Test is this in a different function: set gg_trg_Test = CreateTrigger() call TriggerRegisterUnitInRangeSimple( gg_trg_Test, 128 , t ) call TriggerAddAction( gg_trg_Test, function Test ) call StoreIntString(gg_trg_Test, "damage", 15 + (35 * i)) why in the heck wont it work?! i tried to defined "damage" as an extra local real but it still would give me the error. any ideas? |
