AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   replace string with number (https://forums.alliedmods.net/showthread.php?t=162187)

gamer99 07-16-2011 01:26

replace string with number
 
Hi all ,

I am trying to code a custom ban ..there i want to replace %bantime% with bantime .

So i used

replace_all(str, 127, "%bantime%", dBanTime)

But as its a number i think because of it I am getting the below error.

Quote:

error 035: argument type mismatch
Any idea how to replace that ?

Exolent[jNr] 07-16-2011 01:36

Re: replace string with number
 
Turn the number into a string using num_to_str().

gamer99 07-16-2011 01:53

Re: replace string with number
 
it worked like a charm ... thank you :D


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

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