| Blockland Forums > Modification Help |
| Pre Events |
| << < (5/6) > >> |
| Chrono:
That would work till %par1 = I love pigs!(); Not that you should have a function in chat message anyways. |
| jes00:
--- Quote from: Chrono on June 30, 2011, 03:39:06 PM ---That would work till %par1 = I love pigs!(); Not that you should have a function in chat message anyways. --- End quote --- Why would that not work? and why shouldn't I have one? |
| Gadgethm:
Well, because that parameter is a string. You gave it a function, which is basically saying "Ok script, I want you to place the words ok script go do the function I love pigs in the chat box." That makes no sense. So, what you do is instead of giving the %par1 a function, give it a string like this: --- Code: ---%par1 = "I love pigs!"; --- End code --- That should fix your problem. Hopefully I didn't just make a complete dumbass of myself. |
| Chrono:
--- Quote from: Gadgethm on July 01, 2011, 02:06:24 PM ---Well, because that parameter is a string. You gave it a function, which is basically saying "Ok script, I want you to place the words ok script go do the function I love pigs in the chat box." That makes no sense. So, what you do is instead of giving the %par1 a function, give it a string like this: --- Code: ---%par1 = "I love pigs!"; --- End code --- That should fix your problem. Hopefully I didn't just make a complete dumbass of myself. --- End quote --- You can use a function in there, however, doing something like %par1 = getRandom(1,5); It will only do the getRandom the moment you define that variable, so lets say it got 4, and the event was onActivate, it will ALWAYS show 4, no matter how many times you click it. I love pigs!(); isn't even proper syntax. You would either do Ilovepigs(); or "I love pigs!"; And if you did the former, you would have to define said function via function ILovePigs() { return some stuff here; } |
| jes00:
I made the coding and everything but it's not showing up in the add on list. |
| Navigation |
| Message Index |
| Next page |
| Previous page |