HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hmm, Error ? help plz

10-16-2006, 10:51 AM#1
Fr0zenLord
set udg_PlayersHero[GetConvertedPlayerId(P)] = GetLastCreatedUnit

It comes up with "Expected "("

I dont see why? help plz
10-16-2006, 11:04 AM#2
UnMi
GetLastCreatedUnit()
10-16-2006, 11:31 AM#3
Fr0zenLord
ty, I did it in GUI

Apparently GetTriggerPlayer() and GetLastCreatedUnit()

(Dunno whats with the ()) lol
10-16-2006, 03:13 PM#4
The)TideHunter(
Quote:
Originally Posted by Fr0zenLord
(Dunno whats with the ()) lol

The () are always there, in (i think) every programming language when you call a function.

The reason is some functions take variables, example:

function HelloWorld takes unit u returns nothing
So, you would use this function by something like this:

Collapse JASS:
function Lol takes nothing returns nothing
    local unit u = GetTriggerUnit()
    call HelloWorld(u)
    ...
endfunction

But, for the functions that dont take anything, you dont put anything in, like this:

function HelloWorld takes nothing returns nothing
Collapse JASS:
function Lol takes nothing returns nothing
    call HelloWorld()
    ...
endfunction
10-16-2006, 10:01 PM#5
Fr0zenLord
I see tyhanks
10-17-2006, 05:50 AM#6
Pheonix-IV
Basically it tells the program that it's not using a preset variable and it should take the last relevant variable type used in the program.