- Joined
- May 7, 2009
- Messages
- 228
Well I had yet more trouble with my map today. Warcraft crashes when you try to create a game with it, for no discernible reason.
After a great deal of trial and error, I managed to trace it down to a single commented out line. Which is why I am baffled. Comments aren't supposed to affect the game at all. Why would their inclusion cause crashing? Why does Warcraft hate me?
For example the follow code works perfectly fine,
Yet this code will cause an instant crash. What gives?
After a great deal of trial and error, I managed to trace it down to a single commented out line. Which is why I am baffled. Comments aren't supposed to affect the game at all. Why would their inclusion cause crashing? Why does Warcraft hate me?
For example the follow code works perfectly fine,
JASS:
globals
constant real startdist = 500
integer numplayers=0
integer array slot
integer array kills
integer array deaths
integer array s2p
unit array ship
real array shipx
real array shipy
endglobals
function main takes nothing returns nothing
endfunction
function config takes nothing returns nothing
local integer i=0
call SetMapName("")
call SetMapDescription("")
call SetPlayers(12)
call SetTeams(12)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
loop
exitwhen i>=12
call DefineStartLocation(i,0,0)
call SetPlayerStartLocation(Player(i),i)
call SetPlayerColor(Player(i),ConvertPlayerColor(i))
call SetPlayerRacePreference(Player(i),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(i),true)
call SetPlayerController(Player(i),MAP_CONTROL_USER)
call SetPlayerTeam(Player(i),i/6)
set i=i+1
endloop
endfunction
Yet this code will cause an instant crash. What gives?
JASS:
globals
constant real startdist = 500
// Warcraft 3 sucks!
integer numplayers=0
integer array slot
integer array kills
integer array deaths
integer array s2p
unit array ship
real array shipx
real array shipy
endglobals
function main takes nothing returns nothing
endfunction
function config takes nothing returns nothing
local integer i=0
call SetMapName("")
call SetMapDescription("")
call SetPlayers(12)
call SetTeams(12)
call SetGamePlacement(MAP_PLACEMENT_TEAMS_TOGETHER)
loop
exitwhen i>=12
call DefineStartLocation(i,0,0)
call SetPlayerStartLocation(Player(i),i)
call SetPlayerColor(Player(i),ConvertPlayerColor(i))
call SetPlayerRacePreference(Player(i),RACE_PREF_HUMAN)
call SetPlayerRaceSelectable(Player(i),true)
call SetPlayerController(Player(i),MAP_CONTROL_USER)
call SetPlayerTeam(Player(i),i/6)
set i=i+1
endloop
endfunction