didn't work when i tried to compile it. my code.....
PHP Code:
public plugin_init()
{
register_plugin("YourMom", "Eats", "Vegitables")
makeObject("ben", .steamID[]="halla", 5, .weaponIndx=24)
}
public makeObject(name[], nameIndx, steamID[], steamIDIndx, weapon[], weaponIndx)
{
new tallest
if(nameIndx > steamIDIndx && nameIndx > weaponIndx)
tallest = nameIndx
else if(steamIDIndx > nameIndx && steamIDIndx > weaponIndx)
tallest = steamIDIndx
else if(weaponIndx > steamIDIndx && weaponIndx > nameIndx)
tallest = weaponIndx
else
tallest = 1
new object[3][++tallest]
object[0] = name[]
object[1] = steamID[]
object[2] = weapon[]
return object
}
threw errors all on the isntantiation line..
Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
C:\Documents and Settings\Brandon\My Documents\Downloads\pstudio-0.8.3\temp745.sma(63) : error 001: expected token: "=", but found "["
C:\Documents and Settings\Brandon\My Documents\Downloads\pstudio-0.8.3\temp745.sma(63) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Brandon\My Documents\Downloads\pstudio-0.8.3\temp745.sma(63) : warning 215: expression has no effect
C:\Documents and Settings\Brandon\My Documents\Downloads\pstudio-0.8.3\temp745.sma(63) : warning 215: expression has no effect
C:\Documents and Settings\Brandon\My Documents\Downloads\pstudio-0.8.3\temp745.sma(63) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Brandon\My Documents\Downloads\pstudio-0.8.3\temp745.sma(63) : fatal error 107: too many error messages on one line
Compilation aborted.
4 Errors.
Could not locate output file C:\Documents and Settings\Brandon\My Documents\AMXX scripts\liver_sixteenK.amx (compile failed).
Compilation Time: 0.63 sec
i'd say there's some special headers that need to go on the function, or code within it to make that happen. possible variable declarations? who kows....
P.S. i'm aware that code wouldn't run properly, but it would be runtime errors if executed, not compilation errors as it shows here.