AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Compiling error (https://forums.alliedmods.net/showthread.php?t=330577)

nG_getwreck 02-11-2021 00:20

Compiling error
 
Hello, I got problem when compiling this one.

Errors:
PHP Code:

//// ze_dfinth.sma
//
// dfinth.sma(118) : error 001: expected token: ")", but found ":"
// dfinth.sma(118) : error 029: invalid expression, assumed zero
// dfinth.sma(118) : warning 215: expression has no effect
// dfinth.sma(118) : error 001: expected token: ";", but found ")"
// dfinth.sma(118) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file compiled\dfinth.amx (compile failed).
//
// Compilation Time: 0.31 sec
// ---------------------------------------- 

Line 118:
PHP Code:

copy(text[++pos], sizeof text pos 1== ? (zp_core_is_zombie(id) ? " [Knockback Bomb]" " [Blind Bomb]" " [Kill Bomb]") : g_grenade_description[i]) 


chickez 02-11-2021 03:50

Re: Compiling error
 
PHP Code:

condition YES NO //good
condition YES YES2 NO NO2 //bad

//------
//better for you to use
if ( condition )
    
YES
else
    
NO 

You have lot of to learn.

nG_getwreck 02-11-2021 05:06

Re: Compiling error
 
Quote:

Originally Posted by chickez (Post 2736466)
PHP Code:

condition YES NO //good
condition YES YES2 NO NO2 //bad

//------
//better for you to use
if ( condition )
    
YES
else
    
NO 

You have lot of to learn.

Thanks for this.

Black Rose 02-12-2021 02:09

Re: Compiling error
 
Just to be clear.
PHP Code:

condition1 ? (yes1)condition2 yes2 no2 no1 //good
condition1 yes1 : (no1)condition2 yes2 no2 //good 



All times are GMT -4. The time now is 09:42.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.