script errors

Question

New Member
Reaction score
0
when i save map it say script error and shows these 2.
in the 1st one it says ''invalid type for specified operator'' for the ''return 0''

JASS:
constant function C2I takes code udg_units02 returns integer
return udg_units02
return 0      <<<<<
endfunction


in the 2nd one it says ''expected a function name'' for the ''<<<<'' marked one

JASS:
call SetAllItemTypeSlots(11)
	call SetAllUnitTypeSlots(11)
	set bj_stockUpdateTimer=CreateTimer()
	call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function pd)   &lt;&lt;&lt;&lt;&lt;
	set bj_stockItemPurchased=CreateTrigger()
	call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_PLAYER_UNIT_SELL_ITEM,null)
	call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
	call DetectGameStarted()
	set i=0
	set i=0
	loop
		exitwhen(i&gt;11)
		set udg_booleans01<i>=false
		set udg_reals01<i>=0
		set udg_strings01<i>=&quot;&quot;
		set i=i+1
	endloop</i></i></i>


how do i fix these errors?
 

GenDeath

New Member
Reaction score
6
Change


call SetAllItemTypeSlots(11)
call SetAllUnitTypeSlots(11)
set bj_stockUpdateTimer=CreateTimer()
call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,fu nction pd) <<<<<
set bj_stockItemPurchased=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased,Player(15),EVENT_ PLAYER_UNIT_SELL_ITEM,null)
call TriggerAddAction(bj_stockItemPurchased,function RemovePurchasedItem)
call DetectGameStarted()
set i=0
set i=0
loop
exitwhen(i>11)
set udg_booleans01=false
set udg_reals01=0
set udg_strings01=""
set i=i+1
endloop



to

call TimerStart(bj_stockUpdateTimer,bj_STOCK_RESTOCK_INITIAL_DELAY,false,function pd) <<<<<
 

Question

New Member
Reaction score
0
@anarchon i tried that but i got 9500 more errors ><
@gendeath sorry that was a question typo its meant say function.
 

Anachron

New Member
Reaction score
53
All of the code. It can't be that this is the only code you have in map, or is it?
 

Anachron

New Member
Reaction score
53
Why the hell is that? And are all so badly coded? Pardon, but thats really awful.
 

Anachron

New Member
Reaction score
53
You know that TheHelper / I do not tolerate such things? Also, there must be atleast an evidence to that you are allowed to.
 

Anachron

New Member
Reaction score
53
Yeah, which is the homepage of the map? WHERE? Give us the link.
Also, this code is really awful. I suggest starting again from scratch instead.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top