Saving in arrays
Is it possible to save a text message in arrays like:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Re: Saving in arrays
failpost xD
|
Re: Saving in arrays
what for I need array "i" ?
maybe could explain me more ? why not just something[] = "blabla" or something = "blabla" |
Re: Saving in arrays
You can declare a string like that : new something[] = "hi you are an idiot" ;
But if you string is already declared somewhere, you can't copy text directly, you need to use copy(). |
Re: Saving in arrays
So how can I change my something result from "hi you are an idiot" to "hi you are a dumbass"
new reason[] = ""; |
Re: Saving in arrays
use copy().
new reason[] = ""; <== If you declare a variable without string, you need to specify the max length. new reason[ 128 ]; for example. There are already severals tutorials about such basic knowledge. Start to read that. http://forums.alliedmods.net/showthread.php?t=94381 http://forums.alliedmods.net/showthread.php?t=91207 |
Re: Saving in arrays
Quote:
PHP Code:
|
Re: Saving in arrays
Quote:
|
Re: Saving in arrays
@hleV ; You don't need to say that to me, but I don't see how it can be useful to a beginner, like said fysiks that's not recommended and it would have been confusing for him. He will discover that naturally after having more knowledge.
|
Re: Saving in arrays
By the way, I wan't to ask, if I use menu with player list in it. When one admin selects for example player1, then there is another menu, what do you want to do with him... And at the same time another admin selects player2... I'm saving players like new tempid; So when first admin chooses an action Does action will be applied to Player1 what he selected, or player2 which was selected last and saved in tempid array.
|
| All times are GMT -4. The time now is 10:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.