AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Strings (https://forums.alliedmods.net/showthread.php?t=51892)

Cheap_Suit 02-25-2007 19:55

Strings
 
Okay this is a two part question.

1. Is this wrapper possible?
PHP Code:

#define strsize(%1) sizeof(%1) - 1 

2. If #1 = yes. I seem to have compiling errors with a 3 dimensional array

PHP Code:

new g_string[MAX_A][MAX_B][32]
copy(g_string[num_of_a][num_of_b], strsize(g_string[num_of_a][num_of_b]), sometext


Zenith77 02-25-2007 21:50

Re: Strings
 
1. Yes.

2. Please post what your errors are. Besides that, I think you're using sizeof wrong which is causing your errors. I'm not exactly sure how to use it properly.

Cheap_Suit 02-25-2007 21:53

Re: Strings
 
Im thinking because its a 3d array

Welcome to the AMX Mod X 1.76-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

Error: Expected token: "]", but found "-identifier-" on line 71
Warning: Expression has no effect on line 71
Error: Expected token: ";", but found "]" on line 71
Error: Invalid expression, assumed zero on line 71
Error: Too many error messages on one line on line 71

Compilation aborted.
4 Errors.

VEN 02-26-2007 02:52

Re: Strings
 
Should be strsize(g_string[][][])


All times are GMT -4. The time now is 00:34.

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